in reply to quick "open->close" file
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: quick "open->close" file
by esh (Pilgrim) on Aug 06, 2003 at 15:30 UTC |