Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Parsing for [] in a file

by MidLifeXis (Monsignor)
on Nov 17, 2011 at 17:57 UTC ( #938656=note: print w/ replies, xml ) Need Help??


in reply to Re: Parsing for [] in a file
in thread Parsing for [] in a file

Except it will only work for the first key in %results, as the position in DATA will be at eof.

If you flip around the foreach and the while, it should do as intended.

Update: If you load the variable names (%results), make sure that you use chomp.

--MidLifeXis


Comment on Re^2: Parsing for [] in a file
Select or Download Code
Replies are listed 'Best First'.
Re^3: Parsing for [] in a file
by HJ (Novice) on Nov 17, 2011 at 18:56 UTC
    ah!that greatly worked. Thank you very much. swapping the foreach and while and chomping after foreach.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2015-08-31 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (363 votes), past polls