Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: scandns.pl

by taint (Chaplain)
on Nov 14, 2013 at 06:00 UTC ( #1062535=note: print w/replies, xml ) Need Help??


in reply to Re^2: scandns.pl
in thread scandns.pl

The eval:
$x++ if(($_>=0)&&($_<=255));
as I read it, is:
if the input ($x), is at least 0, and no greater than 255
$x is legitimate, so return $x

So as I see it. There is nothing afoul with my proposed solution.

:)

--Chris

#!/usr/bin/perl -Tw
use Perl::Always or die;
my $perl_version = (5.12.5);
print $perl_version;

Replies are listed 'Best First'.
Re^4: scandns.pl
by jdporter (Canon) on Nov 14, 2013 at 20:12 UTC
    as I read it...

    You're reading it wrong.

    $x is counting the number of valid octets. The number of valid octets should be 4, not simply >0. It's fine to return 4 rather than 'true', but it is not fine to return 1 or 2 or 3. The number of the counting shall be 4.

    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062535]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2018-11-20 00:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (219 votes). Check out past polls.

    Notices?