On Sun, Mar 03, 2002 at 03:27:57PM +0100, Peter Makholm wrote:
> Trying to do completly stupid stuff with perl I tried to do the
> following:
>
> xyzzy% perl -le 'sort {print "a:$a\tb:$b"; $a cmp $b} qw(5 2 3 4 1)'
> xyzzy%
$ perl -wle 'sort {print "a:$a\tb:$b"; $a cmp $b} qw(5 2 3 4 1)'
Useless use of sort in void context at -e line 1.
sort doesn't bother to run if its results aren't being used. If, for
some odd reason, you do want it to work: () = sort ... will trick it
currently.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
Thanks, applied. Or, ??????k@???????K^U
as we Bulgarian EBCDIC users like to say.
-- Jarkko Hietaniemi in <[EMAIL PROTECTED]>