Without going in depth to your code, I can think of two ways of doing that:
push @list, $element unless grep {$_ eq $element} @list; #or keys %hash = @list; $hash{$element}++ unless exists $hash{$element};
Stop saying 'script'. Stop saying 'line-noise'.
We have nothing to lose but our metaphors.
In reply to Re: adding elements to already exisiting elements in an array
by Erez
in thread adding elements to already exisiting elements in an array
by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |