in reply to IP operation trouble

without testing, your my $binaddr inside the eval is out of scope. try:
my $intaddr = 167772419; my $binaddr; eval{ $binaddr = ip_inttobin($intaddr); }; die "Error: $@" if($@);
Boris