So if $file exists, create a temporary IO::File object and read its contents. Not as robust as the <> solution, but it does perform an open/read/close.use IO::File; my $line = -f $file and grep { ... } IO::File->new($file)->get_lines;
_________
broquaint
In reply to Re: quick "open->close" file
by broquaint
in thread quick "open->close" file
by bugsbunny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |