my %seen; while (<DATA>) { print "$1\n" if /(\d+)$/ and not $seen{$1}++; } __DATA__ foo 1 foo 2 bar 1 bar 3 bar 4 bar 2 bar 2 bar 1 baz 1 ex 5
In reply to Re: print a hash
by Roy Johnson
in thread print a hash
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |