Re: sort without ignoring hyphens

2008-04-04 Thread tc314
On Apr 2, 9:04 am, [EMAIL PROTECTED] (Matthew Whipple) wrote: > LC_ALL=C sort echo.txt > > > > [EMAIL PROTECTED] wrote: > > On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > > >> [EMAIL PROTECTED] wrote: > > >>> When I do string comparisons in perl the strings seem to ignore the > >>>

Re: sort without ignoring hyphens

2008-04-02 Thread Matthew Whipple
LC_ALL=C sort echo.txt [EMAIL PROTECTED] wrote: On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: [EMAIL PROTECTED] wrote: When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the char

Re: sort without ignoring hyphens

2008-04-01 Thread tc314
On Mar 29, 3:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > When I do string comparisons in perl the strings seem to ignore the > > embedded hyphens. > > I want to sort strings assuming the 'dictionary' order of the chars is > > ASCII order: hypen, 0-9, A-Z. > > It a

Re: sort without ignoring hyphens

2008-04-01 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > John W. Krahn: >> It appears to work in Perl: >> >> $ perl -le'@x = qw[22 2-2 2-3 23 21]; print for sort @x' >> 2-2 >> 2-3 >> 21 >> 22 >> 23 > > I'm looking for the perl way of comparing strings. > > Your posted code 'diff says memory exhausted need help with perl >

Re: sort without ignoring hyphens

2008-03-31 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Mar 30, 10:57 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: It appears to work in Perl: $ perl -le'@x = qw[22 2-2 2-3 23 21]; print for sort @x' 2-2 2-3 21 22 23 I'm looking for the perl way of comparing strings. Your posted code 'diff says memory exhausted need h

Re: sort without ignoring hyphens

2008-03-31 Thread tc314
On Mar 31, 11:44 am, [EMAIL PROTECTED] (Dr.Ruud) wrote: > [EMAIL PROTECTED] schreef: > > > unsorted: > > 22 > > 2-2 > > 2-3 > > 23 > > 21 > > > linux sort produces: > > 21 > > 22 > > 2-2 > > 23 > > 2-3 > > $ echo ' > 21 > 22 > 2-4 > 2-2 > 23 > 2-3 > ' |sort -n > > 2-2 > 2-3 > 2-4 > 21 > 22 > 23 > >

Re: sort without ignoring hyphens

2008-03-31 Thread tc314
On Mar 30, 10:57 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > > On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > > >> [EMAIL PROTECTED] wrote: > > >>> When I do string comparisons in perl the strings seem to ignore the > >>> embedded hyphens. > >>> I wan

Re: sort without ignoring hyphens

2008-03-31 Thread Dr.Ruud
[EMAIL PROTECTED] schreef: > unsorted: > 22 > 2-2 > 2-3 > 23 > 21 > > linux sort produces: > 21 > 22 > 2-2 > 23 > 2-3 $ echo ' 21 22 2-4 2-2 23 2-3 ' |sort -n 2-2 2-3 2-4 21 22 23 -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: sort without ignoring hyphens

2008-03-30 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: [EMAIL PROTECTED] wrote: When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9,

Re: sort without ignoring hyphens

2008-03-30 Thread tc314
On Mar 29, 4:19 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > [EMAIL PROTECTED] wrote: > > When I do string comparisons in perl the strings seem to ignore the > > embedded hyphens. > > I want to sort strings assuming the 'dictionary' order of the chars is > > ASCII order: hypen, 0-9, A-Z. > > It a

Re: sort without ignoring hyphens

2008-03-29 Thread John W. Krahn
[EMAIL PROTECTED] wrote: When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. It appears linux sort also has the problem (LC_ALL is blank). Any ideas? I want to av

Re: sort without ignoring hyphens

2008-03-29 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > When I do string comparisons in perl the strings seem to ignore the embedded hyphens. > I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. > It appears linux sort also has the problem (LC_ALL is blank). > Any ideas?

sort without ignoring hyphens

2008-03-29 Thread tc314
When I do string comparisons in perl the strings seem to ignore the embedded hyphens. I want to sort strings assuming the 'dictionary' order of the chars is ASCII order: hypen, 0-9, A-Z. It appears linux sort also has the problem (LC_ALL is blank). Any ideas? I want to avoid a brute force char by c