in reply to string substitution
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")
|
|---|