if(length $c[-1]) {
# Now actually processing the preceding literal
$big_pile .= $c[-1];
if($USE_LITERALS and (
(ord('A') == 65)
? $c[-1] !~ m<[^\x20-\x7E]>s
# ASCII very safe chars
: $c[-1] !~ m/[^ !"\#\$%&'()*+,\-.\/0-9:;<=>?\@A-Z[\\\]^_`a-z{|}~\x07]/s
# EBCDIC very safe chars
)) {
# normal case -- all very safe chars
$c[-1] =~ s/'/\\'/g;
push @code, q{ '} . $c[-1] . "',\n";
$c[-1] = ''; # reuse this slot
} else {
push @code, ' $c[' . $#c . "],\n";
push @c, ''; # new chunk
}
####
my $literal = ;
$literal =~ s/\\*'/\\'/g;
# later on...
# There may be a number of literals in reality -
# each would be single quoted to prevent interpolation
my $string = eval "'$literal'";
__DATA__
this could be \'; system("ls -la");\'
####
if(length $c[-1]) {
# Now actually processing the preceding literal
$big_pile .= $c[-1];
$c[-1] =~ s/\\*'/\\'/g;
push @code, " '$c[-1]',\n";
$c[-1] = ''; # reuse this slot
}