after reading page 66 chapter 3 yes this is similar to what is being accomplished with the ip iterator. although the missing module issue. not all systems have that package installed. similar to the other solution below with Net::IP;
the idea behind the tool is to monitor for new servers that are added to the network that can then be picked up from ip iterator and deploy a monitor agent or starting pinging for availability in response. both Net::IP and Net::Netmask may not be installed on the server. hth.
Unix
lpar23ml162f_pub[/opt/camlet/lib] > ./test2.pl
Can't locate Net/Netmask.pm in @INC (@INC contains: /usr/opt/perl5/lib
+/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/s
+ite_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2 /u
+sr/opt/perl5/lib/site_perl .) at ./test2.pl line 3.
BEGIN failed--compilation aborted at ./test2.pl line 3.
Linux
[camlet@cam-lin-s04 tmp]# ./test2.pl
Can't locate Net/Netmask.pm in @INC (@INC contains: /usr/lib/perl5/sit
+e_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i
+386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thre
+ad-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/
+lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/per
+l5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site
+_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/l
+ib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/ven
+dor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8
+.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/
+perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/per
+l5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/
+i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./test2.pl line 3.
BEGIN failed--compilation aborted at ./test2.pl line 3.
[root@cam-lin-s04 tmp]#
|