in reply to Re: Re: Re: Can you spot the problem?
in thread Can you spot the problem?
Without the two character fix/spoiler:
Update: I wasn't offering a Perl 6 solution, despite the subthread my response was in. That would besub isValidIP { return (shift =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ and (($1|$2|$3|$4) + < 256)); }
return (shift =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ and not (($1|$2|$3 +|$4) > 255));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^4: Can you spot the problem?
by ambrus (Abbot) on Mar 05, 2004 at 21:15 UTC |