John Townsend wrote:
> I’m trying to change a space to an escaped space.
>
> I've tried something like this:
>
> $string = "._\\agmptestapp.exe_ <file://\\agmptestapp.exe> -i
> ._\\performance_in\\3Pages3Squares.pdf_
> <file://\\performance_in\\3Pages3Squares.pdf> -o ._\\performance_out\\_
> <file://\\performance_out\\> -1 -dic never -t ps3 -s irs -ppd AdobePDF
> 8.0 -timer > timer.txt";
>
> $string =~ s, ,\ ,g;
> print "string after\n$string\n";
>
> However it does not appear to work.
>
> Can someone suggest a reg ex that works? Or perhaps there is a better
> way to approach the problem?
You have to double your escape:
$string =~ s/ /\\ /g;
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs