On Wed, 24 Jul 2013 12:25:16 -0700
Jim Gibson <[email protected]> wrote:
> In your case, BLOCK is
>
> { $_=~ s/\"/\'/g; "\"$_\"" }
>
> and LIST is @data. Therefore, each element of @data is aliased to $_,
> the substitution s//\"/\'/g is performed on it, which changes all
> double-quote characters to single-quote apostrophes, Then, the second
> 'line' of the BLOCK is evaluated and pushed onto the result list,
> which puts the transformed string between double-quotes. The
> resulting list is joined with '.' characters and printed to the OUT2
> file stream.
And changes the contents of @data so that it contains the original
strings surrounded by double quotes with any internal double quotes
changed to single ones.
--
Don't stop where the ink does.
Shawn
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/