Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: parsing text files continued

by AltBlue (Chaplain)
on Jul 21, 2008 at 18:51 UTC ( [id://699110]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -MData::Dumper -F, -lane '@F % 2 and push @D, {q{Stamp},@F} or 
    +$D[-1] = { %{$D[-1]}, @F } }{ print Dumper @D' input.txt
    
  2. or download this
    $ perl -F, -lane '@F % 2 and push @D, {q{Stamp},@F} or $D[-1] = { %{$D
    +[-1]}, @F } }{ $,=","; print @{$_}{qw(Stamp Login SearchResults Searc
    +hLoad SearchCount Logout)} for @D' input.txt
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-07-12 10:43 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.