Please Remeber to Use the Docs (was: the sort routine)

2002-05-29 Thread Richard_Cox
because it's > first digit is a 6 > > Your question was answered by a another poster. > > I'll reiterate: > > see perldoc -f sort > > The sort routine sorts alphabetically (well, ASCIIbetically) > by default, use > a different comparison operato

Re: the sort routine

2002-05-28 Thread drieux
On Tuesday, May 28, 2002, at 01:03 , Eric Wang wrote: [..] > I have this flat text file with numbers in it. > I tried to use the sort routine but it seems like the numbers were not > sorted at all. a) how did you get the 'numbers' out of the file? b) what was the specific syn

Re: the sort routine

2002-05-28 Thread Michael Fowler
x27;ll reiterate: see perldoc -f sort The sort routine sorts alphabetically (well, ASCIIbetically) by default, use a different comparison operator: @result = sort { $a <=> $b } @array; Michael -- Administrator www.shoebox.net Programmer, System Administrator ww

RE: the sort routine

2002-05-28 Thread Nikola Janceski
use @result = sort {$a <=> $b} @array; sort sort's by cmp (string comparison) by default. > -Original Message- > From: Eric Wang [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 4:21 PM > To: Timothy Johnson > Cc: [EMAIL PROTECTED] > Subject: RE:

RE: the sort routine

2002-05-28 Thread Eric Wang
2002, Timothy Johnson wrote: > > Maybe you could give us an example of what you've done? > > -Original Message- > From: Eric Wang [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 1:03 PM > To: [EMAIL PROTECTED] > Subject: the sort routine > > > >

Re: the sort routine

2002-05-28 Thread Michael Fowler
On Tue, May 28, 2002 at 01:03:01PM -0700, Eric Wang wrote: > I have this flat text file with numbers in it. > I tried to use the sort routine but it seems like the numbers were not > sorted at all. Um, we're going to need a little more detail. What was in the file? What code

RE: the sort routine

2002-05-28 Thread Timothy Johnson
Maybe you could give us an example of what you've done? -Original Message- From: Eric Wang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 1:03 PM To: [EMAIL PROTECTED] Subject: the sort routine Hi People, I have this flat text file with numbers in it. I tried to use the

RE: the sort routine

2002-05-28 Thread Nikola Janceski
perldoc -f sort sort sort's by cmp by default... for numerical use sort { $a <=> $b } > -Original Message- > From: Eric Wang [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 28, 2002 4:03 PM > To: [EMAIL PROTECTED] > Subject: the sort routine > > >

the sort routine

2002-05-28 Thread Eric Wang
Hi People, I have this flat text file with numbers in it. I tried to use the sort routine but it seems like the numbers were not sorted at all. Help.. Eric -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]