in reply to for vs. reverse

Ovid will prolly make mincemeat of me for my regexp atrocity, but what the heck...

print $_="Why do we have to hide from the police, daddy? Because they use vi and we use emacs, son.\n", join('',(/(.*)(vi)(.*)(emacs)(.*)/s)[0,3,2,1,4]);
--Chris

e-mail jcwren

Replies are listed 'Best First'.
Re (tilly) 2: for vs. reverse
by tilly (Archbishop) on Mar 27, 2001 at 05:41 UTC
    Hmmm. That inspires me. Without arrays, loops, REs...
    print (("Why do we have to hide from the police, daddy ? Because they use ", "emacs", " and we use ", "vi", ", son. ")[0..4,0,3,2,1,4]);