in reply to Seeking guidance on how to approach a task
Using the List::Compare module:
Result: user04 user04@emailaddress.comuse strict; use List::Compare; my @list_one = qw/user01 user02 user03/; my %hash_two = qw/user01 user01@emailaddress.com user03 user03@emailad +dress.com user04 user04@emailaddress.com/; my @list_two = keys %hash_two; my $lc = List::Compare->new(\@list_one, \@list_two); my @results = map {$_ . ' '. $hash_two{$_}} $lc->get_Ronly; print join "\n", @results;
Update: I quickly made two files of about 190,000 records and used those to see how long it took. Not including the reading in of the files, the script zipped through all 190,000 records in 14 seconds (on a Windows XP, Athlon XP 1600+, Activestate Perl 5.8.7, running within the Komodo-editor).
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|