Me too. Temporaries are cheap and readable I reckon.

But if we were golfing... Well I suppose it's still pretty ugly.

I do find the
($transformed = $package) =~ s,::,/,g;
construction pretty unreadable though. People expect flow of control to be
left to right, while data flow in assignments is right to left. When you mix
the two idioms on the same line of code, bugs are close by.

Greg

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 04, 2004 5:27 PM
To: [EMAIL PROTECTED]
Subject: Re: s/// w/o intermediate variables?


>>>>> "Greg" == Greg Allen <[EMAIL PROTECTED]> writes:

Greg> $tranformed = map {local $_=$_; s,::,/,g; $_} $package

Ugh.  I'd strangle someone who did that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See
PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.

Reply via email to