Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Parsing a Flat File and counting occurances of numbers?

by druud (Sexton)
on Dec 22, 2006 at 15:57 UTC ( #591347=note: print w/ replies, xml ) Need Help??


in reply to Parsing a Flat File and counting occurances of numbers?

Just a start:

perl -wne ' $h{$1}++ if /bn(\d{4}),/ }{$,="\t"; print %h, "\n" ' datafile
To see the actual code, use:
perl -MO=Deparse -wne ' $h{$1}++ if /bn(\d{4}),/ }{$,="\t"; print %h, "\n" '

-- 
Ruud


Comment on Re: Parsing a Flat File and counting occurances of numbers?
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-11-29 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls