$top = 10;

open $fh, "<", '135-0.txt';
($text = join '', <$fh>) =~ tr/A-Z/a-z/
    or die "Can't open '135-0.txt': $!\n";

@matcher = (
    qr/[a-z]+/,     
    qr/\w+/,        
    qr/[a-z0-9]+/,  
);

for $reg (@matcher) {
    print "\nTop $top using regex: " . $reg . "\n";
    @matches = $text =~ /$reg/g;
    my %words;
    for $w (@matches) { $words{$w}++ };
    $c = 0;
    for $w ( sort { $words{$b} <=> $words{$a} } keys %words ) {
        printf "%-7s%6d\n", $w, $words{$w};
        last if ++$c >= $top;
    }
}