in reply to object scope problem?

Here's a problem:

$int{$cur_int}{ip}="";

Your hash may have empty strings as values, if there's a line starting interface not followed with an  ip address line. You can remove this block of code entirely. If you really need to keep it, change it to delete $int{$cur_int}{ip};