in reply to hash me a few variables

Try:
printf "%s appeared %d %s\n", $keyhash->{NAME}, $num, ...
Have a look at perldoc perlref