Ah! I got it.
my @sorted_data = sort { length $a <=> length $b || $count_hash{b} <=> + $count_hash{$a} } keys %count_hash;
should be
my @sorted_data = sort { length $a <=> length $b || $count_hash{$b} <= +> + $count_hash{$a} } keys %count_hash;
We were just missing a "$" before the "b"...
In reply to Re^2: String sorting in Perl
by markdavis87
in thread String sorting in Perl
by markdavis87
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |