use strict; use warnings; use Data::Dumper; my $inFile = q{spw612167.dat}; open my $inFH, q{<}, $inFile or die qq{open: $inFile: $!\n}; my @conArr = (); while ( <$inFH> ) { chomp; push @conArr, split m{=>}; } close $inFH or die qq{close: $inFile: $!\n}; my %conHash = @conArr; print Data::Dumper->Dump([\@conArr, \%conHash], [qw{*conArr *conHash}]); #### @conArr = ( 'article', 'art', 'chapter', 'chap', 'section', 'sec' ); %conHash = ( 'chapter' => 'chap', 'article' => 'art', 'section' => 'sec' );