in reply to for vs. reverse
Well, here's yet another version (but without 'for', 'reverse', or 'map'):
printf <<HERE x 2, qw(emacs vi)[0,1,1,0]; Why do we have to hide from the police, daddy? Because they use %s and we use %s, son. HERE
Update: Hmm, I only tested the above with 5.6.0 -- you can't directly subscript the qw() operator in 5.00503 it seems. Easily fixed by either wrapping the qw() inside another level of parens, or using the more literal: ('emacs', 'vi')[0,1,1,0].
|
|---|