in reply to Re: iterating through a hash?
in thread iterating through a hash?
#!/usr/bin/perl use strict; use warnings; open FH2, "o44.txt" or die $!; my %file2 = map{ $_ => 1} <FH2>; close FH2 or die $!; open FH1, "o33.txt" or die $!; while (<FH1>) { s/\s+/$file2{ $_ } ? " OK " : " WRONG "/e; print; } close FH1 or die $!;
|
|---|