I might write code something like this:
If you slurp all of the lines into an array, you could also use the grep command.my $dir = "/acm"; # open file while (<LOG>) { next unless /^\Q$dir\E/; # do something with $_ because it matches }
In reply to Re: grepping for
by chromatic
in thread grepping for
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |