use strict; use warnings; my %hash; while (<DATA>) { chomp; $hash{$_}++ for (split); } print "ALPHABETIC\n"; print "$_ $hash{$_}\n" for (sort keys %hash); print "\nBY NUMBER\n"; print "$_ $hash{$_}\n" for (sort {$hash{$b} <=> $hash{$a} || $a cmp $b} keys %hash); __DATA__ three blind mice three blind mice see how they run
In reply to Re: How do you place words from a sentence into an array?
by TedPride
in thread How do you place words from a sentence into an array?
by Diakoneo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |