in reply to Comparing a value to a list of numbers
you can use grep like in if grep{ $given == $_ } @nums or any from List::Util
Anyway what you posted is not perl: the equal sign = is an assignement operator and you need == to compare nums and eq for strings. if must be lowercase and square brackets are for anonymous arrays.
L*
|
|---|