Re: Need help sorting by specific fields in file.

2004-02-03 Thread Rob Dixon
R. Joseph Newton wrote: > > "Dennis G. Wicks" wrote: > > > Greetings; > > > > I have a file that I need to sort and currently I am just > > sorting it by > > > > @datalist = sort(@datalist); > > Try this: > > > @articles = sort {substr($a, 6) + 0 <=> substr($b, 6) + 0} > > @files; > > >

Re: Need help sorting by specific fields in file.

2004-02-02 Thread R. Joseph Newton
"R. Joseph Newton" wrote: Correction inline. Forgot the start param for substr() > "Dennis G. Wicks" wrote: > > > Greetings; > > > > I have a file that I need to sort and currently I am just > > sorting it by > > > > @datalist = sort(@datalist); > > Try this: > > > @articles = sort {

Re: Need help sorting by specific fields in file.

2004-02-02 Thread R. Joseph Newton
"Dennis G. Wicks" wrote: > Greetings; > > I have a file that I need to sort and currently I am just > sorting it by > > @datalist = sort(@datalist); Try this: > @articles = sort {substr($a, 6) + 0 <=> substr($b, 6) + 0} > @files; > > but I can't figure out how to tell the sort that $

Re: Need help sorting by specific fields in file.

2004-02-02 Thread Eric Edwards
Wicks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 02, 2004 1:49 PM Subject: Need help sorting by specific fields in file. > Greetings; > > I have a file that I need to sort and currently I am just > sorting it by > > @datalist = sor

Re: Need help sorting by specific fields in file.

2004-02-02 Thread Dennis G. Wicks
wrote: > Date: Mon, 2 Feb 2004 14:14:31 -0600 > From: Eric Edwards <[EMAIL PROTECTED]> > To: Dennis G. Wicks <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Subject: Re: Need help sorting by specific fields in file. > > Dennis, > Not to tell you how to run your business,

Re: Need help sorting by specific fields in file.

2004-02-02 Thread James Edward Gray II
On Feb 2, 2004, at 1:49 PM, Dennis G. Wicks wrote: Greetings; I have a file that I need to sort and currently I am just sorting it by @datalist = sort(@datalist); Okay, but you're not sorting a file there. You're sorting an array. Maybe that array was loaded from a file, but we're dealin

Re: Need help sorting by specific fields in file.

2004-02-02 Thread Michael C. Davis
At 01:49 PM 2/2/04 -0600, Dennis G. Wicks wrote: >I have a file that I need to sort and currently I am just >sorting it by > > @datalist = sort(@datalist); > >but it will eventually have many more records and many of >them may be quite large, but I only need to sort on the >first six characte

Need help sorting by specific fields in file.

2004-02-02 Thread Dennis G. Wicks
Greetings; I have a file that I need to sort and currently I am just sorting it by @datalist = sort(@datalist); but it will eventually have many more records and many of them may be quite large, but I only need to sort on the first six characters which would be faster. Wouldn't it? I have