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

Re: Comparing strings from different files

by Lennotoecom (Pilgrim)
on Oct 08, 2013 at 20:24 UTC ( #1057458=note: print w/ replies, xml ) Need Help??


in reply to Comparing strings from different files

that is ugly but working

while( <> ){ while(/(E99|99)(\w+)(?=\|)|\n/){ $key .= $`; $hash{$key}++; $key = '->'.$2; $_ = $'; } } foreach (sort keys %hash){ print "$_ $hash{$_}\n" if $hash{$_} >= 2; }
run it like ./script.pl FILE1 FILE2
output will be yours repeating lines,
accordingly == 1 will show you unique lines
P.S. and turn out warnings)
P.P.S. sorry for ugliness


Comment on Re: Comparing strings from different files
Download Code
Replies are listed 'Best First'.
Re^2: Comparing strings from different files
by Lennotoecom (Pilgrim) on Oct 08, 2013 at 20:30 UTC
    under "line" I meant any symbols between E99/99 markers

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2015-07-28 03:45 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 (252 votes), past polls