Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 cooling their heels in the Monastery: (4)
As of 2025-11-10 23:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (67 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.