Help for this page
while (<DATA>) { chomp; print "\n$1 =" and next if /^(interface\s.+)/; print "$1" and next if /^\s+(switchport description\s.+)/; }
my (%data, $last); while (<DATA>) { ... ##now print for ( sort keys %data ) { print "$_ = $data{$_}\n" }