$|++; AUTOLOAD; use strict; use warnings 'all'; if (open(FILE,"c:\\logfile.txt")) { print "\nExtracting Data from c:\\logfile.txt.......Please Wait: "; $/='*' x 66; my @ShowtechLog =; close FILE; print "Done\n\n"; my ( $Interface, $InterfaceInfo, $SwitchPort, $SwitchDesc ); for my $data (@ShowtechLog) { if ($data =~ /show running-config/) { for (split (/\n+/,$data)) { $Interface = $1, next if (/interface port-channel (\d+)$/); $InterfaceInfo->{$Interface}->{$1} = $2 if (/switchport description To (\w+) ([\d\.]+)/); $SwitchPort = $1, next if (/^interface (fc\d+\/\d+)$/); $SwitchDesc->{$SwitchPort} ={$1} if (/switchport description (.+)/); } } } print "\nPort Descriptions\n"; for my $Port (keys %{$SwitchDesc}) { print "$Port : "; for my $Desc (keys %{$SwitchDesc->{$Port }}) { print "$Desc\n"; } } } else { warn "\n$!\tc:\\logfile.txt\n"; } #### interface port-channel 1 switchport trunk allowed vsan 1000 switchport trunk allowed vsan add 1050 switchport description To CCC219 10.33.81.56 switchport mode E interface port-channel 3 switchport trunk allowed vsan 1000 switchport trunk allowed vsan add 1010 switchport trunk allowed vsan add 1050 switchport trunk allowed vsan add 1900 switchport description To CCC215 10.33.81.52 switchport mode E interface mgmt0 ip address 10.33.81.54 255.255.240.0 interface fc1/1 switchport description Trunk switchport mode E channel-group 3 force no shutdown interface fc1/2 interface fc1/3 switchport description DMX01_FA3CA no shutdown interface fc1/4 switchport description DMX01_FA8BA no shutdown interface fc1/5 switchport description Trunk switchport mode E channel-group 1 force no shutdown interface fc1/6 interface fc1/7 interface fc1/8 switchport description DMX01_FA7BA no shutdown interface fc1/9 interface fc1/10 interface fc1/11 interface fc1/12 switchport description DMX01_FA4BA no shutdown interface fc1/13 interface fc1/14 switchport description DMX01_FA9BA no shutdown interface fc1/15 switchport description DMX01_FA7CA no shutdown interface fc1/16 switchport description DMX01_FA3BA no shutdown interface fc2/1 switchport mode E interface fc2/2 interface fc2/3 switchport description DMX01_FA4CA no shutdown interface fc2/4 switchport description DMX01_FA8AA no shutdown interface fc2/5 switchport description Trunk switchport mode E channel-group 1 force no shutdown interface fc2/6 interface fc2/7 switchport description DMX01_FA14BA no shutdown interface fc2/8 switchport description DMX01_FA7AA no shutdown interface fc2/9 interface fc2/10 interface fc2/11 no shutdown interface fc2/12 switchport description DMX01_FA4AA no shutdown interface fc2/13 interface fc2/14 interface fc2/15 switchport description DMX01_FA8CA no shutdown interface fc2/16 switchport description DMX01_FA3AA no shutdown interface fc3/1 switchport description misdr no shutdown interface fc3/2 no shutdown interface fc3/3 interface fc3/4 interface fc3/5 no shutdown interface fc3/6 no shutdown interface fc3/7 interface fc3/8 interface fc3/9 no shutdown interface fc3/10 no shutdown interface fc3/11 interface fc3/12 interface fc3/13 no shutdown interface fc3/14 no shutdown interface fc3/15 interface fc3/16 interface fc3/17 no shutdown interface fc3/18 switchport speed 2000 no shutdown interface fc3/19 interface fc3/20 interface fc3/21 no shutdown interface fc3/22 interface fc3/23 interface fc3/24 interface fc3/25 switchport description Tim Test no shutdown interface fc3/26 interface fc3/27 interface fc3/28 interface fc3/29 no shutdown interface fc3/30 interface fc3/31 interface fc3/32 interface fc4/1 no shutdown interface fc4/2 no shutdown interface fc4/3 interface fc4/4 interface fc4/5 no shutdown interface fc4/6 no shutdown interface fc4/7 interface fc4/8 interface fc4/9 no shutdown interface fc4/10 no shutdown interface fc4/11 interface fc4/12 interface fc4/13 no shutdown interface fc4/14 no shutdown interface fc4/15 interface fc4/16 interface fc4/17 no shutdown interface fc4/18 interface fc4/19 interface fc4/20 interface fc4/21 no shutdown interface fc4/22 interface fc4/23 interface fc4/24 interface fc4/25 no shutdown interface fc4/26 interface fc4/27 interface fc4/28 interface fc4/29 no shutdown interface fc4/30 interface fc4/31 interface fc4/32 #### Extracting Data from c:\logfile.txt.......Please Wait: Done Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Use of uninitialized value in hash element at C:\Perl\test.pl li ne 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Use of uninitialized value in hash element at C:\Perl\test.pl li ne 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Odd number of elements in anonymous hash at C:\Perl\test.pl line 33. Port Descriptions : To CCC215 10.33.81.52 fc2/7 : DMX01_FA14BA fc1/15 : DMX01_FA7CA fc2/16 : DMX01_FA3AA fc1/3 : DMX01_FA3CA fc1/14 : DMX01_FA9BA fc1/8 : DMX01_FA7BA fc2/3 : DMX01_FA4CA fc2/15 : DMX01_FA8CA fc1/16 : DMX01_FA3BA fc1/4 : DMX01_FA8BA fc2/4 : DMX01_FA8AA fc3/1 : misdr fc1/5 : Trunk fc1/1 : Trunk fc2/8 : DMX01_FA7AA fc2/5 : Trunk fc1/12 : DMX01_FA4BA fc3/25 : My Test fc2/12 : DMX01_FA4AA #### Odd number of elements in anonymous hash at C:\Perl\test.pl line 33.