If your hash is declared as a my() variable inside a block during entry, you can even have the memory freed when you leave the block.while(<STDIN>){ push @array, $_; if($hash{$_}){ print "$_ was entered more than once\n"; } $hash{$_}++; }
In reply to Re: Simple Array
by swiftone
in thread Simple Array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |