On Nov 16, 2007 6:19 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: > > You should *always* check the return value of system functions like > open(), flock(), seek(), chdir(), unlink(), etc. > >
Thanks John. I know it's good to check the return value at those places. But I don't think it's so valueable work. b/c when you open,flock,unlink a file unsuccessfully, it's most likely a system problem, not the perl program's probrom. > > /^172\.32\./ is outside of the range of 172.16.0.0 - 172.31.255.255. > > sorry, was mistaken on this. I have fixed it, it now looks as below: if ($ip =~ /^10\./ or $ip =~ /^172\.1[6-9]\./ or $ip =~ /^172\.2[0-9]\./ or $ip =~ /^172\.3[0-1]\./ or $ip =~ /^192\.168\./ ) { $netaddr{private} = $ip; } else { $netaddr{public} = $ip; } Thanks again! :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/