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...