in reply to Re: Re: Newbie Question on pushing Arrays
in thread Newbie Question on pushing Arrays
But in this case, it also causes confusion, since you sorted the list in alphabetical order. Hence, 11 comes before 2. The real solution is to remove both of the sorts from your code.
But if for some reason you actually did need to sort them, you would do this instead:
@primes = sort { $a <=> $b } @primes
Update: It's amazing that I generated the same content as chipmunk did, but that it took me so much longer. I really have to work on my typing skills...
buckaduck
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Newbie Question on pushing Arrays
by m_heimburger (Initiate) on May 04, 2001 at 21:05 UTC |