use strict; my $t = 'c:\tmp/sup'; print "$t\n"; $t =~ s?\\|/?\\\\?g; print "Modified\n$t\n";