DevMonk_1 has asked for the wisdom of the Perl Monks concerning the following question:

Hey Monks, I have created a perl utility for searching a pattern in source file(word document) and matching it with the destination folder(number of .c files). I have created a batch file which first converts the word document into text form and another batch file which searches pattern in source document(now .txt) and the corresponding pattern in destination folder. The problem comes if I store the destination folder in a path containing spaces for eg: "C:\Documents and Settings\Destination" etc. Even tried including the path in "" but it's still not working. Please suggest me any options or changes I need to make. Thanks, DevMonk

Replies are listed 'Best First'.
Re: Spaces in "Path"
by daxim (Curate) on Jul 23, 2012 at 09:25 UTC
    Please suggest me any options or changes I need to make.

    For that to work, you need to show your code.

Re: Spaces in "Path"
by brx (Pilgrim) on Jul 23, 2012 at 09:35 UTC
    Even tried including the path in "" but it's still not working.

    Use single quotes: ''.

    Try that:

    C:\>perl -e "open OUT,'>','D:\My Spaced Path\myfile';print OUT 'foobar +';"
      Also tried using ''...but it's not working! The problem is when accessing a directory, a single file can be accessed by using "".

        but it's not working!

        So you say, but where is your code?

        use autodie; # for error checking

        daxim: For that to work, you need to show your code.
        Anonymous Monk: So you say, but where is your code?

        Help us to help you: please, show your code.

        English is not my mother tongue.
        Les tongues de ma mère sont "made in France".