in reply to System command clips off last part of local url when folder name has a space in it

Use the list form of system,

my $url = 'C:/Code/Perl/Phi Kap/temp.html'; system 'start', $url;
That bypasses the shell, so the space doesn't confuse command parsing.

Alternatively, you could construct the string argument to quote $url after interpolation, probably with qq().

After Compline,
Zaxo

  • Comment on Re: System command clips off last part of local url when folder name has a space in it
  • Download Code

Replies are listed 'Best First'.
Re^2: System command clips off last part of local url when folder name has a space in it (!list)
by tye (Sage) on Aug 16, 2004 at 16:37 UTC

    "C:/" is a pretty clear indication of Windows, where this trick doesn't work. Windows programs get a command line passed to them, not a list of command arguments. So you can't bypass the parsing of the command line (even if you bypass the shell). Adding double quotes is usually how to deal with spaces in arguments (for most programs).

    - tye