The <> operator has DWIM magic to act either as glob or readline.
So it tries to use your hash like a list of filename patterns to be expanded like glob does.
Like others indicated just use readline to avoid ambiguity or copy the hash element to a simple scalar.
HTH! :)
Cheers Rolf
( addicted to the Perl Programming Language)
see I/O Operators:
If what's within the angle brackets is neither a filehandle nor a simple scalar variable containing a filehandle name, typeglob, or typeglob reference, it is interpreted as a filename pattern to be globbed, and either a list of filenames or the next filename in the list is returned, depending on context.
In reply to Re: FileHandles in a Hash (<> ambiguity)
by LanX
in thread FileHandles in a Hash
by Wiggins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |