This uses a look behind ((?<=")) to match the " and a \b to make sure the " is followed by a "word" character.
use warnings; use strict; while (<DATA>) { s/(?<=")\b/..\//; print; } __DATA__ if (-e "test2122.asm")
Prints:
if (-e "../test2122.asm")
In reply to Re: string substitution
by GrandFather
in thread string substitution
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |