Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: creating a hash from a text file.

by AnomalousMonk (Archbishop)
on Jul 27, 2010 at 07:45 UTC ( [id://851478]=note: print w/replies, xml ) Need Help??


in reply to Re: creating a hash from a text file.
in thread creating a hash from a text file.

Loop condition
    while ($line =~ /(\d+)\s+(\w+)/) { ... }
will produce infinite loop. Use /g regex modifier to extract all pairs:
    while ($line =~ /(\d+)\s+(\w+)/g) { ... }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-19 14:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found