in reply to Comparing a value to a list of numbers

Hello g_speran,

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*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.