There are two approaches.
my @lines = <FILE>; will read from an open file handle into an array.
Update: tilly pointed out that it's also possible to re-read the file. You can do that by closing and reopening the file (which assumes that the file hasn't been rewritten in the interim), or you can rewind the file handle.
In reply to Re: FILE operation in PERL
by dws
in thread FILE operation in PERL
by ramesh_nathan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |