perl -e "print qq(c\:\\other)" c:\other perl -e "print qq(c:\\other)" c:\other #Consider in Perl on win you can use the backslash too in path # perl -e "$path = qq(c:/windows); print qq(Exists and is a directory!\n) if -e -d $path" Exists and is a directory!