$line =~ s|\perl...remove the backslash before the p in 'perl'
Dave.
Am I correct in understanding that you have a Perl script that is acting to modify a file that happens to contain text that is (or at least looks like) a Perl script?
The s/// operator is not the system() function. This remains true notwithstanind the fact that the text that it happens beacting on looks like a line of Perl code with a system() function in it.
The sequence \p in a Perl regular expression has a meaning (to do with Unicode).
You are incorrect. You are way, way overestimating interpolation of strings. Perl only executes external programs in backticks, system() and exec(). (Well, and a few other ways, but definitely not in regexes or double/single quoted strings.)
The \p in regexen is for Unicode properties. You definitely don't want it there.
perlmonks.org content © perlmonks.org and Anonymous Monk, dave_the_m, fishbot_v2, nobull
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03