in reply to Spaces in file path

If you used warnings, Perl would tell you what goes wrong:

> perl -we "my $filename = qq(d:\Swalpa Development kaliri ....Sir\Wor +kSpace\Perl\CMD_File.txt);" Unrecognized escape \S passed through at -e line 1. Unrecognized escape \W passed through at -e line 1. Unrecognized escape \P passed through at -e line 1. Unrecognized escape \C passed through at -e line 1.

A backslash is a special character in (double-quoted) strings. See perlop.

Replies are listed 'Best First'.
Re^2: Spaces in file path
by gvinu4u (Acolyte) on Jul 07, 2011 at 16:53 UTC
    Thanks a lot changed \ to / and now it works.