Re: Counting and sorting an array

2001-05-18 Thread Timothy Kimball
Slight correction: : pushd @petcounts, sprintf "<%d> %s%s", should be push @petcounts, sprintf "<%d> %s%s", -- tdk

Re: Counting and sorting an array

2001-05-18 Thread Timothy Kimball
: I would like to sort an array like this : my @pets = {$cat, $dog,$camel,$camel,$camel,$dog} : and then to have it printed out in the order of occurrences : print "I will give you <3> camels, <2> dogs, <1> cat " for the blond one Well, first of all, what you have there isn't really an array.

Counting and sorting an array

2001-05-17 Thread Kenan
Hi , I would like to sort an array like this my @pets = {$cat, $dog,$camel,$camel,$camel,$dog} and then to have it printed out in the order of occurrences print "I will give you <3> camels, <2> dogs, <1> cat " for the blond one Tnx Kenan