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

Michael W Thelen <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
* Allen, Greg <[email protected]> [2004-05-04 10:27]:
> more generally, this works for me:
> 
> $tranformed = map {local $_=$_; s,::,/,g; $_} $package

It does..?  When I run that, $transformed gets a value of 1, since
that's what the map returns in scalar context.  I think you meant to put
parens around $transformed.

-- Mike

-- 
Michael W. Thelen
The reverse side also has a reverse side.
                -- Japanese proverb
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAl/Dai2mnNBpOvV0RAoQqAJ42tPm1N0uYolJpmK9glmGpnm3x2ACgjxkO
sJu8yvTc01ctCk4uDaNVRvQ=
=AZXN
-----END PGP SIGNATURE-----
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.