my %parsed_list_for; for my $word (@list) { my $word =~ /(\w+)(\w+)(\d+)/; $parsed_list_for{ $word }{ 'alpha' } = $1; my $word =~ /\[(\d+)/; $parsed_list_for{ $word }{ 'numeric'} = $1; } # use Data::Dumper to dump your hash and see your results