open FILE, '<', $filename or die "Can't open $filename: $!\n"; my @lines = <FILE>; close FILE or die "Can't close $filename: $!\n";
will fill @lines. See also the $/ variable.
--
Yours in pedantry,
F
o
x
t
r
o
t
U
n
i
f
o
r
m
"Anything you put in comments is not tested and easily goes out of date." -- tye
In reply to Re: Making an array out of each line in a file
by FoxtrotUniform
in thread Making an array out of each line in a file
by exfacior
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |