Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: seek and process from there on

by zakame (Pilgrim)
on May 30, 2006 at 15:56 UTC ( [id://552532]=note: print w/replies, xml ) Need Help??


in reply to seek and process from there on

Perhaps you wanted something like this:
open STUFF, "<", $file or die "Can't open $file: $!"; while (<STUFF>) { chomp; $seen{internal_name}++, next if /^internal name/; if ($seen{internal_name}) { if (/^need this/) { # do your stuff here } } }
At the start, nothing is done until /^internal name/ is seen. If we see one, we just take note of that in a hash key, which we test later on when we get to do the real work. Update: I suddenly remembered there was a predefined DATA filehandle...

Log In?
Username:
Password:

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

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

    No recent polls found