Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
If this is going to be at all robust (umm and work as desired, sorry Blakem) I would change the sort to the following:
Your code doesnt actually sort the words by length. (Yes I _am_ deliberately storing the length before I quotemeta it.) :-)
Update Although IIRC perl will optimize the first into the second anyway, it does save about 10 chars or so.. Oh also for the curious this is more modern form of the Schwartizian Transform which is a very cool trick. Unfortunately I cant remember the name of this version, nor the link to the excellent document I read about it. Hopefully someone that does will post a reply.
Update2
DeMerphq / Yves In reply to Re: Re: Re:{2} Getting impossible things right (behaviour of keys)
by demerphq
|
|