Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Need code for comparing

by bichonfrise74 (Vicar)
on Nov 04, 2009 at 16:09 UTC ( [id://804967]=note: print w/replies, xml ) Need Help??


in reply to Need code for comparing

Seems pretty straight forward. What have you tried so far? Hopefully, here is something to help you.
#!/usr/bin/perl use strict; my $file_1 = <<HEREDOC; daw2n 189445 eastparkway ca daw1n 189445 eastparkway ca dawn 189445 eastparkway ca HEREDOC open( my $file, '<', \$file_1 ) or die "Cannot open $file_1"; my @first_records = <$file>; close( $file ); while (my $line = <DATA>) { for my $i (@first_records) { print "Record in file 1 found in file 2: $i" if ( $line eq "$i" ); } } __DATA__ kathy 329390 westbrook wa kat1hy 329390 westbrook wa dawn 189445 eastparkway ca kat2hy 329390 westbrook wa

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2024-04-25 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found