...or something like that$input = <STDIN>; chomp $input; $input =~ /\d+\.\d+\.\d+\.\d+/ or die "bad input"; foreach $k($input =~ /\d+/g) { die "bad input" if($k<0 or $k>255); }
In reply to Re: Regular Expression to Match IP Address
by aquarium
in thread Regular Expression to Match IP Address
by sashac88
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |