Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: FileHandles in a Hash

by Laurent_R (Prior)
on May 28, 2014 at 18:55 UTC ( #1087701=note: print w/ replies, xml ) Need Help??


in reply to FileHandles in a Hash

Just for you to know another trap of hashes of file handles, if you want to write to a file handle in a hash, you usually have to enclose the hash element between curly braces. For example:

print {FH_hash{$foo}} $line_out;
I tried to see if enclosing the file handle within curlies for reading with the diamond <> operator might work:
while (<{FH_hash{$foo}}>) { #...
but that does not help. Using the readline function is really the right solution.


Comment on Re: FileHandles in a Hash
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1087701]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2015-07-07 18:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls