I expect to get -$dir1="D:\\Windows\\programs1"; $dir2="D:\\Windows\\programs2"; $file1 = ="D:\\Windows\\programs1\\a.txt"; ($file2 = $file1) =~ s/$dir1/$dir2/esg; print "file1 -> $file1\n"; print "file2 -> $file2\n";
but i got -file1 -> D:\Windows\programs1\a.txt file2 -> D:\Windows\programs2\a.txt
Any idea ?file1 -> D:\Windows\programs1\a.txt file2 -> D:\Windows\programs1\a.txt
Thanks in advance
azariaIn reply to problem in substitution by azaria
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |