in reply to hashs and file handle globs
I'm not sure, but I think it works along the same lines as $_, a scalar that's filled with the line as the while loop iterates over the file. This is just an assumption, but I think you can't stuff into an array or hash slice.
If you put the following into your code:
print *MF; print "\n"; print $opt{'M'};
you'll see that the variables have the same content (unless there's some metadata controlling that), so it appears that the filehandle is being copied into the hash. I think your problem lies in the while loop, but I'm not sure yet why that is.
Update: from perlsyn:
The while is evaluating whether or not the hash or array has something in it. It's not evaluating the fileglob inside.
John J Reiser
newrisedesigns.com
|
|---|