undef @theseWords; @theseWords = split( / /, $line ); #### $Line{$word} =~ m/(\d*?)$/; if ( $1 == $count ) { next; } else { $Line{$word} .= ", $count"; #### push @{$Line{$word}}, $count unless exists $Line{$word} && $Line{$word}[-1] == $count;