if (/^array|^unassigned/){ print "$row\n" if $inarray; $row=$_; my (undef, $unit, undef, undef , undef, undef , undef, $port, undef, undef, undef, undef, undef,undef) = split /[\s,:]+/, $row; $inarray=m/^array/; next; } next unless $inarray; $row .= " $_"; } close $fd;