Advertisement
szabozoltan69

multiliner.pl

Jan 13th, 2012
217
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/perl
  2. use strict;
  3. my $filename = shift;
  4. open (FILE, "<", $filename)  or  die "Nincs ilyen fajl: $filename : $! \n";
  5. my $whole_file;
  6. {
  7.     local $/;
  8.     $whole_file = <FILE>;
  9. }
  10. close(FILE);
  11. while ($whole_file =~ m#(0022..\n0112..\n0121..\n0220..\n0301..\n1003..\n1012..\n1030..\n1111..\n1120..\n1210..\n1300..\n2002..\n2011..\n2101..\n3100..\n)#sg) {
  12.     print $1 . "\n";
  13. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement