wiki:Dev/Perl

Version 47 (modified by mitty, 13 years ago) (diff)

--

perlbrew

CPAN

cpanminus

misc

  • JPerl Advent Calendar 2010

    今年も JPerl Advent Calendar の季節がやってきました。 Perl に関連する tips を25本おとどけしちゃいます。 12月1日から毎日一本ずつ tips をアップしていっちゃうという企画です。 くわしくはこのあたりをみてください。

  • htmltree => cpan:HTML::TreeBuilder
    #!/usr/bin/perl
    # Time-stamp: "2000-10-02 14:48:15 MDT"
    #
    # Parse the given HTML file(s) and dump the parse tree
    # Usage:
    #  htmltree -D3 -w file1 file2 file3
    #    -D[number]  sets HTML::TreeBuilder::Debug to that figure.
    #    -w  turns on $tree->warn(1) for the new tree
    
    (snip)
    
  • CPAN:Parallel::ForkManager

    SYNOPSIS

    use Parallel::ForkManager;
    
    $pm = new Parallel::ForkManager($MAX_PROCESSES);
    
    foreach $data (@all_data) {
      # Forks and returns the pid for the child:
      my $pid = $pm->start and next; 
    
      ... do some work with $data in the child process ...
    
      $pm->finish; # Terminates the child process
    }
    
  • CPAN:Convert::Bencode

    No error detection of bencoded data. Damaged input will most likely cause very bad things to happen, up to and including causeing the bdecode function to recurse infintly.

    • oh...