perlgrok.pl
changeset 7 c4085453688b
parent 6 78c000fd2ee7
child 8 31c4ce4d9b73
equal deleted inserted replaced
6:78c000fd2ee7 7:c4085453688b
    47     print "       defaults are stdin, stdout, 'patterns' as patternfile and 'TEST' as final macro.\n\n";
    47     print "       defaults are stdin, stdout, 'patterns' as patternfile and 'TEST' as final macro.\n\n";
    48     exit;
    48     exit;
    49 }
    49 }
    50 
    50 
    51 # read patterns
    51 # read patterns
    52 my $f = new IO::File "< patterns" or die "cannot open patterns: $!";
    52 my $f = new IO::File "< $fn_pattern" or die "cannot open patterns: $!";
    53 while( <$f> ) {
    53 while( <$f> ) {
    54     chomp;
    54     chomp;
    55     # skip empty and comment lines
    55     # skip empty and comment lines
    56     next if /^ *(#|$)/;
    56     next if /^ *(#|$)/;
    57     
    57