if (my $hit= /^port-channel (\d+)$/ .. /^\s*$/) { if ($hit == 1) { $pc_name = $1; next; } $Rec->{$pc_name}->{$1} = $2 if (m|(fc\d+/\d+)\s+\[(\w+)\]|); #line 15 } elsif (my $hit= /^interface port-channel (\d+)$/ .. /^\s*$/) { if ($hit == 1){ $key = $1; next; } $hash->{$key}->{$1} = $2 if (/switchport description To (\w+) ([\d\.]+)/); #line 18 }