c:\>perl -nle"push @{$h{$_}},$ARGV}{print qq[$_ found in @{$h{$_}}] for keys %h" 0.dat 1.dat 2.dat 3.dat 4.dat 5.dat 6.dat 7.dat 8.dat 9.dat #### $perl -nle'push @{$h{$_}},$ARGV}{print "$_ found in @{$h{$_}}" for keys %h' ?.dat #### #! perl -nl push @{ $h{ $_ } }, $ARGV }{ print qq[$_ id in @{$h{ $_ }}] for keys %h; #### c:\>theScript.pl 0.dat 1.dat 2.dat 3.dat 4.dat 5.dat 6.dat 7.dat 8.dat 9.dat #### $perl theScript.pl ?.dat