Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?


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

in reply to Re^2:
in thread

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.



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

Replies are listed 'Best First'.
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?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2019-01-22 21:21 GMT
Find Nodes?
    Voting Booth?
    After Perl5, I'm mostly interested in:

    Results (392 votes). Check out past polls.