STRING: for( $ipaddress, $prefix, $interface, $device, $location, $comment ) { next STRING unless defined; # We skip any element that is not defined s/^\s+|\s+$//g; }