Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Need code for comparing

by bichonfrise74 (Vicar)
on Nov 04, 2009 at 16:09 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://804967]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2018-07-16 20:35 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (349 votes). Check out past polls.