in reply to shell vs. filehandler
The advantage of this method is you're specifying the maximum size of the data in advance, so memory can be allocated all at once and reading isn't in chunks. I prefer this for files small enough to comfortably fit into available memory.open($handle, $fpath); read($handle, $str, $maxsize); close($handle);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: shell vs. filehandler
by halley (Prior) on Feb 11, 2005 at 14:39 UTC |