#!/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 $!;
In reply to Re^2: iterating through a hash?
by Cristoforo
in thread iterating through a hash?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |