Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: printing to filehandle contained in a hash

by ikegami (Patriarch)
on Feb 20, 2010 at 01:44 UTC ( [id://824308]=note: print w/replies, xml ) Need Help??


in reply to printing to filehandle contained in a hash

The pattern you are using,
while (my ($fileh, $repoch) = each(%radar)){ if ($ltgepoch == $repoch) { ... } }
defies the entire purpose of using a hash. The above should be
if (exists($radar{$ltgepoch})) { ... }
which means your keys and your values are backwards. Switch them around and it also solves the problem you asked about.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found