in reply to Need to match number other than 1

if ( $number =~ m/^\d+$/ and $number != 1 ) { # do stuff } else { die "There can be only 1!" }