use List::Util qw( first ); open my $fh, '<', $your_file; my $line = first { m{ $your_pattern }x } <$fh>;
In reply to Re: Grepping with Perl: How to stop after first match?
by doom
in thread Grepping with Perl: How to stop after first match?
by paulnovl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |