in reply to Replacing single quotes to two single quotes inside map
Assuming you don't mind changing $data->{$_} directly (rather than making a copy) ...
my $sql = exec_select( "call store_proc(" . join(',', ('?') x @allparm +s ) . ")", map { $data->{$_} =~ s/'/''/g; $data->{ $_ } | +| '' } @allparms );
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Replacing single quotes to two single quotes inside map
by Anonymous Monk on Nov 10, 2017 at 21:24 UTC | |
by duff (Parson) on Nov 10, 2017 at 22:26 UTC |
In Section
Seekers of Perl Wisdom