$count = 1#!/bin/perl5 use strict; use warnings; my %hash = ( key1 => 0, key2 => 0, key3 => 0); my %dups = reverse %hash; my $count = keys %dups; print "$count\n";
Beaten to the post of course. This is just in case you wanted to do it on two lines instead of one!
In reply to Re: scanning hash
by wfsp
in thread scanning hash
by hotshot
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |