Paul Lalli wrote: > "187" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> A. Sinan Unur wrote: >>> "187" <[EMAIL PROTECTED]> wrote in >>> news:2s07v9F1fvtn5U1 @uni-berlin.de: >>> >>>> C:\> perl -e "print qq{\n}, join(qq{\n}, sort { lc{$a} cmp >>>> lc($b) } split(/;/, $ENV {'PATH'})), qq{\n};" >>> >>> I like one liners but I avoid them precisely for this type of >>> problem: lc{$a} should be lc($a) or just lc $a. >> >> But what I really don't understand is why it doesn't result in a >> compile error? lc{$a}, one would think, is not a valid statement. > > The warning below answers this question. > >> I admit should I have used -w in there: >> >> Odd number of elements in anonymous hash at -e line 1. >> Odd number of elements in anonymous hash at -e line 1. >> Odd number of elements in anonymous hash at -e line 1. >> [......] >> > > You're passing to the lc() function an anonymous hash. That anonymous > hash is poorly constructed, containing an odd number of elements. So > it is not invalid syntax, it's just not at all what you meant. > > Paul Lalli
-- 187
