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

Re^3: frequency strings 2 files

by thundergnat (Deacon)
on Jul 06, 2012 at 15:49 UTC ( #980304=note: print w/ replies, xml ) Need Help??


in reply to Re^2: frequency strings 2 files
in thread frequency strings 2 files

That's not a mess... THIS is a mess:

open$x,pop;@x=map{chomp;$_}<$x>;pop@x;map{chomp;$x{$_}++}<>;print map{ +$_,$",$x{$_}||0,$/x2}@x

when run with your test files yields:

>perl mess.pl testfile1 testfile2
5 3

2 2

3 2

1 0

SCNR


Comment on Re^3: frequency strings 2 files
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-07-04 00:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls