If (as your example implies) the filename is passed as the first command line argument, then you can use the empty file input operator (<>) to read from it.
--my @found = grep { something } <>;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: quick "open->close" file
by davorg
in thread quick "open->close" file
by bugsbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |