2004-11 / 2004-11-01

前のエントリ: telnet で http [HTTP]
次のエントリ: Apache .htaccess の IP アドレス指定書式 [Apache]

IPaddr の計算用モジュール
2004-11-01-3 / カテゴリ: [network][programming][perl] / [permlink]

http://search.cpan.org/~luismunoz/NetAddr-IP-3.21/
use NetAddr::IP ;
 
my $ip = new NetAddr::IP "192.168.175.4/255.255.255.128" ;
 
print "The address is ", $ip->addr, " with mask ", $ip->mask, "\n" ;
print "nw    is ", $ip->network,     "\n" ;
print "bc    is ", $ip->broadcast,   "\n" ;
print "range is ", $ip->range,       "\n" ;
print "first is ", $ip->first->addr, "\n" ;
print "last  is ", $ip->last->addr,  "\n" ;
print "mask  is ", $ip->masklen,     "\n" ;
print "num   is ", $ip->num,         "\n" ;
便利!
前のエントリ: telnet で http [HTTP]
次のエントリ: Apache .htaccess の IP アドレス指定書式 [Apache]

2013 : 01 02 03 04 05 06 07 08 09 10 11 12
2012 : 01 02 03 04 05 06 07 08 09 10 11 12
2011 : 01 02 03 04 05 06 07 08 09 10 11 12
2010 : 01 02 03 04 05 06 07 08 09 10 11 12
2009 : 01 02 03 04 05 06 07 08 09 10 11 12
2008 : 01 02 03 04 05 06 07 08 09 10 11 12
2007 : 01 02 03 04 05 06 07 08 09 10 11 12
2006 : 01 02 03 04 05 06 07 08 09 10 11 12
2005 : 01 02 03 04 05 06 07 08 09 10 11 12
2004 : 01 02 03 04 05 06 07 08 09 10 11 12

最終更新時間: 2013-05-02 16:12