perl -le '$_="Just another Perl hacker";/e/;sub AUTOLOAD{eval qq{sub $ +{(caller"Just")[scalar(()="a coke please"=~//g)]}}.qq}{(caller"Just") +[scalar(()="give me a coke"=~//g)]=~m(([^\072]*)\$)\x7d};&${(caller"J +ust")[scalar(()="coke, no more pepsi"=~//g)]}};print+(join$",map{join +$,,map{eval"main::$_()"}split//}split),","'
Windows users might want to put it in a file first. (Translating quotes might be tedious.)
Update: This requires 5.8. Sorry about that. I'll try to figure it out later.
Later: Here is a fix for older perls.
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: "no more pepsi" JAPH
by simonm (Vicar) on Aug 13, 2003 at 01:34 UTC | |
by sauoq (Abbot) on Aug 13, 2003 at 02:02 UTC | |
by thelenm (Vicar) on Aug 13, 2003 at 16:16 UTC | |
by simonm (Vicar) on Aug 13, 2003 at 16:39 UTC | |
by deliria (Chaplain) on Aug 13, 2003 at 11:52 UTC | |
|
Re: "no more pepsi" JAPH
by sauoq (Abbot) on Aug 13, 2003 at 20:01 UTC |