Ouch. You don't have to read all lines in at once first. This line is doing that since the angle bracket operator is invoked in array context:
To read a line at a time do this instead:my @file = <FH>;
local *FH; open(FH, "/path/to/file") || die "Can't open file: $!"; while (<FH>) { # line is in $_ if ($_ eq $external_info) { print "great\!"; last; } } close(FH);
In reply to Re: Reading from file, not to memory
by steves
in thread Reading from file, not to memory
by FireBird34
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |