>From the keyboard of A. Pagaltzis [09.12.07,21:50]: > * Marcus Holland-Moritz <[EMAIL PROTECTED]> [2007-12-09 21:20]: > > We're all stuck at 21. :-) > > Well, `bless`, `shift` or `$_[0]`, `{}`, [EMAIL PROTECTED], and one comma are > all inevitable. That's 15 characters in fixed strings alone. Then > you'll also need to rearrange list or evaluation order somewhere, > which means at least one pair of delimiters with two indices and > a separator inside, so that's another 5 tokens that can't be any > shorter than 1 character. > > Therefore no possible solution to this problem can be any shorter > than 20 characters under any circumstances. > > Besides the solutions already posted, I found a couple of ways to > write it in 22 characters, plus two more ways to do it in 21 > characters, one of should work but doesn't because of that stupid > prototype that `bless` has. > > But I didn't manage to beat 21 characters, probably because it's > not possible. Beating 20 would certainly be impossible.
Well, if we were to return an array reference instead of a hash ref, sub [EMAIL PROTECTED],shift} works. Why does the shift get executed before an array reference is constructed - but not if a hashref is constructed - from an array? 0--gg- -- _($_=" "x(1<<5)."?\n".q·/)Oo. G°\ / /\_¯/(q / ---------------------------- \__(m.====·.(_("always off the crowd"))."· ");sub _{s,/,($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e,e && print}