in reply to
newbie alert: find in array
To add $c to @a only if $c does not appear in @a:
push(@a,$c) unless (grep { $_ eq $c } @a);
A hash might be better as this is somewhat costly on an array...
Comment on
Re: newbie alert: find in array
Download
Code
In Section
Seekers of Perl Wisdom