I'm suffering from idiom-dazzle! This works:
use strict; my @toBeMoved = qw(133 22 103 133 133 22 1 999); my %h; $h{$_} = 1 for @toBeMoved; @toBeMoved = sort {$a <=> $b} keys %h; print "@toBeMoved\n";
But what's up with the increment and equality test inside of the grep? I'm reading this as each grep pass will set the value of the current hash element to 1 by the increment operator, but what's going on w/ the equality test? Would a kindly monk please break this grep block down for me?
In reply to Re: Unique Array Items
by Art_XIV
in thread Unique Array Items
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |