in reply to Reading from file, not to memory

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:

my @file = <FH>;
To read a line at a time do this instead:
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);

Replies are listed 'Best First'.
Re: Reading from file, not to memory
by FireBird34 (Pilgrim) on Feb 20, 2003 at 03:27 UTC
    I got what I needed -- thanks for the help!