Re: New Perl Quiz of the Week mailing list perl-qotw

[email protected] (Geoff Hubbard)
Newsgroups perl.golf
Message-ID <[email protected]>
On Mon, Oct 21, 2002 at 05:14:49PM +1000, Andrew Savige wrote:
>
> It may be too soon to start golfing this, but a more normal
> interpretation of (-ugene's brilliancy is something like:
> 
> sub subst{join'',map--$|?$_:eval,split/(\$\d+)/,$_[$|=0]}
> 
> if you allow the subroutine to mangle $| (admittedly dubious).
> Can anyone do better?
> 

Anything wrong with:

sub subst{eval"\"$_[0]\""}  

or is that too easy?

Geoff.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.