Help for this page

Select Code to Download


  1. or download this
    my $working_dir = $ARGV[0];     # starting directory
    my $extension   = $ARGV[1];     # extension to save
    ...
    #       unlink $_              if scalar @matches > 1 && $ext ne $exte
    +nsion;
        }
    }
    
  2. or download this
    my @data;
    while (<>) {
    ...
            }
            print "\n";
    }
    
  3. or download this
    use POSIX ":sys_wait_h";
    
    ...
         sleep(1);  # wait for all children to finish
    }
    exit 0;
    
  4. or download this
    # Straight forward way (sort keys slows down the larger the list)
    my %hash = map { $_ => 1 } @items;
    ...
    # This is the method under the hood in List::MoreUtils::uniq
    my %h;
    my @uniq = map { $h{$_}++ == 0 ? $_ : () } @items;
    
  5. or download this
    # AC_CHECK_PM
    #----------------------------------------------------------
    ...
            AC_MSG_ERROR([missing perl module $1, not in @INC])
    fi;dnl
    ])