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

Ivan Heffner iheffner at gmail.com
Fri Apr 14 16:55:43 PDT 2006


# For Verbosity's Sake
# Get a list of all tests were run
my @tests = ( keys( %dirtytests ), keys( %cleantests ) );

# iterate over the tests, giving dirty / clean counts for each
for my $test ( @tests) {
    my $dirty = $dirtytests{ $test } || 0;      # avoid the warning
    my $clean = $cleantests{ $test } || 0;      # avoid the warning

    # gives a line that looks like 'foo:0_0'
    printf "%s:%d_%d\n", $test, $dirty, $clean;
}

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


More information about the spug-list mailing list