Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
      $hash{$line} = $text;
    }
    print $hash{$_} . "\n" for (sort keys %hash)
    
  2. or download this
    perl pm1.pl < input.txt > output.txt
    
  3. or download this
    use strict;
    use warnings;
    ...
      $array[$2] = 1 if ($_ =~ m/(.+)(\d+)$/)
    }
    print defined $_ ? $_ . "\n" : "\n" for @array[1..$#array];