There's also the File::Grep module from CPAN which provides some easy-to-use file grepping functionality.use strict; open my $fh, "file.txt" or die "Error opening file.txt: $!"; my @lines = <$fh>; my @matches = grep /pattern/, @lines;
In reply to Re: Questions about Grep
by friedo
in thread Questions about Grep
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |