my $all = do {local $/; }; #### #!/usr/bin/perl -w use strict; my $bit="ace"; my (%hash); while () { if ($_ =~ /$bit/) { my @ray=($_ =~ /$bit/g); my $c=scalar @ray; $hash{$_}=$c; } } my @rank=sort{$hash{$b}<=>$hash{$a}}keys%hash; print @rank; __DATA__ In the wire game, a "mob" composed of dozens of grifters simulates a "wire store", i.e., a place where results from horse races are received by telegram and posted on a large board, while also being read aloud by an announcer. The griftee is given secret foreknowledge of the race results minutes before the race is broadcast, and is therefore able to place a sure bet at the wire store. In reality, of course, the con artists who set up the wire store are the providers of the inside information, and the mark eventually is led to place a large bet, thinking it to be a sure win. At this point, some mistake is made, which actually makes the bet a loss.