in reply to Re: how to open a file with space in its name
in thread how to open a file with space in its name

If one is trying to escape filenames etc in a situation like this I prefer
"start soffice \Q$file\E";
to
"start soffice \"$file\"";
that way anything weird in the string is escaped, including " chars that may be in it... of course, the list version of system is safer.

                - Ant
                - Some of my best work - (1 2 3)

Replies are listed 'Best First'.
Re^3: how to open a file with space in its name
by Corion (Patriarch) on Jan 05, 2006 at 15:37 UTC

    Which will not work for Win32 filenames, as a file named c\:\\autoexec\.bat does not exist.

    Also, the quoting rule of double quotes (") is different for cmd.exe too - "" gets converted to ", """ gets converted to "" and so on. I think. In any case, quotemeta is not what you want when quoting strings for cmd.exe or command.com.

      Too true... I have written Perl on Windows all of about twice, so I tend to be biased towards Unix-style programming, my bad.

                      - Ant
                      - Some of my best work - (1 2 3)