On Jul 24, 2013, at 12:33 PM, Shawn H Corey wrote: > On Wed, 24 Jul 2013 12:25:16 -0700 > Jim Gibson <jimsgib...@gmail.com> 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.
True, except the surrounding double-quotes are only included in the output list of map, and are not added to the elements of @data. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/