Brian Fraser wrote:
...and before someone chastises me (rightly so) for using (??{CODE}) in a situation where a perfectly good (?{CODE}) would've done just fine, or for not skipping that first line, or using $1 instead of the more scalable $^N.. Here's a little preemptive redemption:while (<DATA>) {next if /^>/; () = /(.)(?{ $regex_count{$^N}++; $total++ })/g;
Why are you returning the results of //g to an empty list, in void context?
} printf "%s\t=>\t%f\n", $_, ($regex_count{$_} / $total) * 100 for sort keys %regex_count;
John -- Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. -- Albert Einstein -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
