Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: scandns.pl

by taint (Chaplain)
on Nov 14, 2013 at 05:29 UTC ( [id://1062532]=note: print w/replies, xml ) Need Help??


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

Greetings jdporter.

So is you're assignment.

I take back most of my 1st reply to you.

If choosing you're assignment. CDIR masks will be rejected:

% ./scandns.pl 209.197.123.153/29 209.197.123.153 is an invalid address. %
Using my assignment (correct, or incorrect):
% ./scandns.pl 209.197.123.153/29 209.197.123.152 => renku.org => 4.79.43.173 209.197.123.153 => perlmonks.pair.com 209.197.123.154 => taidsaccount.com 209.197.123.155 => murphyworld.com => 208.91.197.132 209.197.123.156 => beetz.at 209.197.123.157 => best-kids-bedding-prices-online.com => best-kids-be +dding-prices-online.com has no A record 209.197.123.158 => lowest-prices-for-kids-bedding.com => lowest-prices +-for-kids-bedding.com has no A record 209.197.123.159 => no PTR record %
Not to sound too much the smart a$$. But before ridiculing someone for trying to help. Perhaps it best to test your own solution first?

Best wishes.

--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 (Paladin) on Nov 14, 2013 at 20:21 UTC

    I don't know, I think maybe you've made other changes to the code? Because when I run it with that exact argument — 209.197.123.153/29 — I get a result indicating that the IP address is valid.

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

      I just now copied the source from this page. Then only removed the
      ($x==4)
      from the offending line, and replaced it with your proposed solution
      ($x=0)
      then ran it;

      % ./scandns.pl 209.197.123.153/29 209.197.123.153 is an invalid address %
      I have no idea. The only possible difference(s) I can imagine, would be

         * differing OS's
         * differing versions of: IO::Socket or Net::Netmask
         * differing versions of Perl itself

      Sincerely confused.

      Best wishes.

      --Chris

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

        Please read my original reply again. My suggested fix was not to replace
        ($x==4)
        with
        ($x==0)

        but to replace
        my $x;
        with
        my $x=0;

        All I can say is, if this is the accuracy with which you approach programming, I would never hire you.

        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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1062532]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-03-29 15:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found