Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to Parse a Text into HoA

by japhy (Canon)
on Nov 01, 2005 at 15:00 UTC ( #504598=note: print w/ replies, xml ) Need Help??


in reply to How to Parse a Text into HoA

The problem is that you're declaring $fname in every iteration of the loop, so it's always undef by the time you're using it as a hash key. Move the declaration of $fname OUTSIDE the while loop and you'll be ok.


Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart


Comment on Re: How to Parse a Text into HoA

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-10-22 00:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls