prints somefile.txt. Also, note the use of \Q...\E to escape meta characters from the interpolated string.$ScriptPath = q(\\SERVER\C\$\APP\BIN); $file = "$ScriptPath\\somefile.txt"; $file =~ s/\Q$ScriptPath\E\\//; print $file;
In reply to Re: s/// and variable interpolation
by LTjake
in thread s/// and variable interpolation
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |