getting error messaeg while substitution
Anonymous Monk
created: 2006-04-02 14:25:29
i am having a file in which i have statement
$ret_val = system("perl $ENV{SOURCE_ROOT}/scripts/Test_script.pl");
and i want to make a substitution in which i want to remove occurence of perl from this line. i tried this by using file handle for that file and doing following substitution
$line =~ s|\perl \$ENV{SOURCE_ROOT}/scripts/Test_script.pl|\$ENV{SOURCE_ROOT}/scripts/Test_script|si;
but i am getting following error message
Can't find unicode character property definition via main->e or e.pl at unicode/Is/e.pl line 41
i dont know why this is coming . how can this be removed so that my substituton is done correctly
Re: getting error messaeg while substitution
created: 2006-04-02 14:30:04
$line =~ s|\perl...
remove the backslash before the p in 'perl'

Dave.

Re^2: getting error messaeg while substitution
created: 2006-04-02 14:32:39
if i remove backslash it will start execution of script if i am correct
Re^3: getting error messaeg while substitution
created: 2006-04-02 15:52:18
You appear to be getting very confused between code and data.

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

Re^3: getting error messaeg while substitution
created: 2006-04-02 15:53:59

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