Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Parsing multi-line records

by twerq (Deacon)
on Dec 04, 2001 at 20:51 UTC ( [id://129366]=note: print w/replies, xml ) Need Help??


in reply to Parsing multi-line records

well, i guess you could make a small subroutine that returns an 11-line block out of the file. not taking into account any bad records, here's some pretty straight-forward code:
sub returnrec { my ($i,$record); for ($i = 0; $i < 11; $i++) { $record .= <FILEHANDLE>; } return $record; }
then you can say something like:
my @elements = split /\;/, returnrec();

--twerq

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-06-17 19:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.