in reply to (tye)Re: Filehandles and Arrays
in thread Filehandles and Arrays
I kicked all of these around some, and I'm still confused. Possibly this is a local issue to me, possibly not. In summary, I got ar0n's technique to work when no file was being read from the command line (in the debugger, at least), but not the modification suggested by merlyn and tye (who I would not dream of ignoring), and neither when a file was being read. But tye says it works for him, and tye is an honorable man...
So, below are what I did and what happened, and if I'm making a stupid mistake I'll be very happy to find out what it is. I'm only including the results trying to read from two files at once, because it's long enough already, and the other ones don't add anything much.
For reference, This is perl, version 5.004_04 built for IP27-irix
Pseudo-update: and it appears that it is indeed relevant. Oh, why can't they install 5.6 here?Oh well, at least I'm not confused any more. :-)
| Suggestion by | merlyn and tye do { local *ARGV; @ARGV =$name;<> } |
ar0n my @array = do { local @ARGV = $name; <> }; |
| My implementation |
|
|
| My results |
|
|
|
|---|