in reply to Re^3: Replacing single quotes to two single quotes inside map
in thread Replacing single quotes to two single quotes inside map
map { (my $dx = $data->{ $_ } || '') =~ s/’/'/g; $dx } @allparms
But that would replace 0's with empty strings. Use // to replace only undefs.
Update:
map { (my $dx = $data->{ $_ } // '') =~ s/’/'/g; $dx } @allparms
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Replacing single quotes to two single quotes inside map
by Anonymous Monk on Nov 14, 2017 at 19:47 UTC |