can be written as -my $value = $list{$location}; $value++; $list{$location} = $value;
And your entire code block can be simplified to just one line of Perl (assuming your $location is never '0') -$list{$location}++;
$list{ $location || 'Unknown' }++;
In reply to Re: Looping structure
by Roger
in thread Looping structure
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |