Kevin Pfeiffer wrote:
> 
> In article <[EMAIL PROTECTED]>, John W. Krahn wrote:
> 
> > You need to convert the IP address to a 32 bit integer and back again.
> >
> > use Socket;
> >
> > my $start_address  = unpack 'N', inet_aton( '10.11.1.14' );
> > my $finish_address = unpack 'N', inet_aton( '12.13.2.3' );
> >
> > for my $address ( $start_address .. $finish_address ) {
> >     print inet_ntoa( pack 'N', $address );
> >     }
> 
> (But this includes numbers such as 12.13.1.255 and 12.13.2.0 which are not
> in the sample pattern.)

That depends.  They could all be in the 8/5 address space.  :-)  I take
it that you are assuming a netmask of 255.255.255.0.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to