in reply to Regular expression range question (was: Clueless newbie - help!)

Um, if I'm clear, you need to know how to match a number from 1-126 or from 17-31:
# tests for a 3 digit number from 1 - 126 $num =~ m/^(1(?:[01]\d|2[0-6])|\d?\d)$/; # tests for a 2 digit number from 17 - 31 $num =~ m/^(1[7-9]|2\d|3[01])$/;
This is a bit messy so you may want to investigate methods by which you can check IP's that don't use a regex. Perhaps one of the Net modules.




Amel
This is my cool %SIG