Correct. I'm observing, right now, memory consumption reading 400 MB file using both examples, both in 5.18 and 5.20. And trying to read 800 MB file results in "Out of memory!" (32-bit OS) with 5.18 and $s = do{...}; syntax, but not in other 3 cases. I said "somehow" because scalar doesn't get "IsCOW" flag, but mechanism (do not copy a buffer PV points to) must perhaps be the same.
In reply to Re^4: Any downsides to this slurp idiom?
by vr
in thread Any downsides to this slurp idiom?
by haukex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |