Hi Corion,
You sir are a Genius!! I see it!!
C:\Users\pritesh\textfiles>perl undef.pl Before: $VAR1 = {}; After: $VAR1 = { '1' => undef, '3' => undef, '54' => undef, '2' => undef, '4' => undef, '45' => undef, '55' => undef };
So like you said, the undef @unique{@array} basically does the magical thing of taking all the the elements in the @array, setting them as a key and "undef" the value. Now, keys gotta be unique, so it's going to remove the duplicates, and just keep the unique keys.
Boy, I feel like Neo when he finally "gets" the Matrix :D
On a serious note, Data::Dumper should be called Data::Enlightenment :)
In reply to Re^2: What does undef do when I say @hashslice{@array} = undef
by pritesh
in thread What does undef do when I say @hashslice{@array} = undef
by pritesh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |