This does create a temporary hash, but avoids the need to choose a name for the hash:
my @items = qw( foo bar bar baz quux baz ); my @unique = local(*_) && grep(!$_{$_}++, @items); print "$_\n" for @unique;
In reply to Re: keys with an expression
by tobyink
in thread keys with an expression
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |