SPUG: Diff keys(%hast0) with keys(%hash1) both ways ?

Ivan Heffner iheffner at gmail.com
Fri Apr 14 13:46:33 PDT 2006


Why not just do this:

for my $check ( keys %{ { %cleantests, %dirtytests } } ) {
    printf "%s:%d_%d\n", $check, $dirtytests{$check}||0, $cleantests{$check}||0;
}

or more compactly:

printf "%s:%d_%d\n", $_, $dirtytests{$_}||0, $cleantests{$_}||0 for
keys %{{%cleantests, %dirtytests}};

--
Ivan Heffner
Sr. Software Engineer
DAS Lead
WhitePages.com


More information about the spug-list mailing list