in reply to Re: Need to search for a string in a file
in thread Need to search for a string in a file
Will my @list = grep /re/, <FH> necessarily pull the entire file into memory? (I don't know and would like to know for sure!)
It sure seems to!
open my $fh, "<", "/dev/urandom" or die "$!"; my @a = grep /huh, whaddayamean/, <$fh>;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Need to search for a string in a file
by aaron_baugher (Curate) on Oct 20, 2011 at 22:29 UTC | |
by anneli (Pilgrim) on Oct 20, 2011 at 23:07 UTC | |
by aaron_baugher (Curate) on Oct 21, 2011 at 18:36 UTC |