in reply to Re^4: local() for scalar file slurping
in thread local() for scalar file slurping
In the version where $foo is assigned to from within the do{}, you just have the $foo variable to hold the whole file, since it is assigned to in chunks from the file buffer. There is no other space allocated to hold the contents returned by the do{} block because the value of the do{} is not assigned to anything. Thus only one copy of the whole file has to be held in memory at one time.
That's the way I read it anyway.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: local() for scalar file slurping
by diotalevi (Canon) on Jul 31, 2006 at 15:46 UTC | |
by rodion (Chaplain) on Jul 31, 2006 at 16:59 UTC | |
by diotalevi (Canon) on Jul 31, 2006 at 17:02 UTC | |
by rodion (Chaplain) on Jul 31, 2006 at 19:28 UTC | |
|
Re^6: local() for scalar file slurping
by apotheon (Deacon) on Jul 29, 2006 at 23:25 UTC | |
by rodion (Chaplain) on Jul 30, 2006 at 01:06 UTC |