Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Parse File Containing Multiple Batches With Correlating Detail Records

by alien_life_form (Pilgrim)
on Sep 18, 2002 at 07:40 UTC ( [id://198755]=note: print w/replies, xml ) Need Help??


in reply to Parse File Containing Multiple Batches With Correlating Detail Records

Greetings,

what about:

while(<>) { chomp; if(/^FT.*/) { $ft_flag ++; next; } if(/^FH.*/) { $fh_flag ++; next; } if($ft_flag) {...; next;} if($fh_flag) {...; next;} if(/^BH.*/) { $current_bh=$_; next; } if(^0006.*) { do_whatever_using($current_bh,$_); next; } }

Cheers,
alf
You can't have everything: where would you put it?
  • Comment on Re: Parse File Containing Multiple Batches With Correlating Detail Records
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2024-04-26 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found