[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 help with perl
Options'
is the basis I want to build from.
But it appears the gt,eq,lt comparisons ignore the hyphens in the
strings.
No they do not.
I really want to avoid slowing things to a crawl by doing brute force
byte comparisons rather than string compares.
Perl's string comparison operators *do* compare each byte.
(I'm really looking for a minimal patch to your code to produce the
desired results.)
perldoc -q "How do I handle binary data correctly"
perldoc perllocale
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/