Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: pinger - ping a range of hosts

by spaz (Pilgrim)
on Mar 23, 2001 at 23:09 UTC ( #66704=note: print w/replies, xml ) Need Help??

in reply to pinger - ping a range of hosts

I only have 2 comments really :)
  • Your regexp for IP's is flawed, I can enter 999.999.999.999, which obviously isn't a real IP.
    I found something similar to this in the Ram book
    Disclaimer: I realize this may not be the most efficent regex, but it does work, right?
  • If you're on a UNIX machine, you could always use nmap
-- Dave

Replies are listed 'Best First'.
Re: Re: pinger - ping a range of hosts
by idnopheq (Chaplain) on Apr 26, 2001 at 15:31 UTC
    The errata for Perl Cookbook at O'Reilly has a modified ip validation re. It is also in ping for ppt by me.

    m{ ^ ( \d | [01]?\d\d | 2[0-4]\d | 25[0-5] ) \. ( \d | [01]?\d\d | 2[0-4]\d | 25[0-5] ) \. ( \d | [01]?\d\d | 2[0-4]\d | 25[0-5] ) \. ( \d | [01]?\d\d | 2[0-4]\d | 25[0-5] ) $ # from the Perl Cookbook, Reci +pe 6.23, }xo # pages 218-9, as fixed in the + 01/00 reprint

    Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.

      ١.٢.٣.٤ is not a valid IP, it matches the regex though :)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2020-10-21 08:21 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (212 votes). Check out past polls.