Help for this page
#!/usr/bin/perl use strict; ... $newdir =~ s/$oldroot_regex/$newroot/ or warn "Can't find pattern '$oldroot_regex' in dir string '$newdi +r'"; print "newdir now: '$newdir'\n\n";
Oldroot will be used as the pattern; It is 'c:\top' newdir was: 'c:\top\dir\file' ... Escaped pattern is 'c\:\\top' newdir was: 'c:\top\dir\file' newdir now: 'c:\newtop\dir\file'