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);
In reply to Re: shell vs. filehandler
by TedPride
in thread shell vs. filehandler
by 10basetom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |