Re: s/// w/o intermediate variables?

<[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>

   From: [email protected] (Randal L. Schwartz)
   Date: 04 May 2004 09:26:52 -0700

   >>>>> "Greg" == Greg Allen <[email protected]> writes:

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

   Ugh.  I'd strangle someone who did that.



  $tranformed = do { local $_ = $package; s,::,/,g; $_ };

better?

kj
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.