http://qs321.pair.com?node_id=1203140


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 );