#! c:/perl/bin/perl.exe # # $|++; AUTOLOAD; use strict; use warnings 'all'; my $Rec; $/ = "*\n"; ## Define the record separator to the end of the multiple line record while () { chomp; next if ($_ eq ""); $Rec->{$1} = $2 if ($_=~ /-+\s+show (switchname)\s+-+\n(\w+)\n\*+/mg); print "$1 $2\n"; } close DATA;