Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Processing lines after a pattern in a while loop

by halley (Prior)
on Apr 06, 2004 at 14:41 UTC ( #342941=note: print w/replies, xml ) Need Help??


in reply to Re: Processing lines after a pattern in a while loop
in thread Processing lines after a pattern in a while loop

This is where I wish the magic while (<fh>) was a bit more inclusive, or a bit less special, or something.

Too bad this doesn't work, because it sure makes for a readable idiom:

<DATA> until /^#cardtype/; while (<DATA>) { ... }
The closest readable alternative that works seems to be:
1 until <DATA> =~ /^#cardtype/; while (<DATA>) { ... }

--
[ e d @ h a l l e y . c c ]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2023-12-11 23:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (41 votes). Check out past polls.

    Notices?