# [Israel.pm] how do I specify a pathname with spaces on win32

Tal Kelrich tal at musicgenome.com
Mon Sep 27 05:33:26 PDT 2004

```On Mon, 27 Sep 2004 14:01:34 +0200
"Uri Itscowits" <pm-il at itzko.hopto.org> wrote:

> Hi all,
>
> I fail to run a cmd using system:
> system("c:\some spaced cmdname")
>
> the result is "c:\some" not found !
>
> In case it wasn't clear, I am doing it on MS-windows ( to my surprise
> too).
>
> help pls ...
>

Try using quotes, ie
system('"c:\something with spaces in"');
or, use system with an argument list, ie
system("c:\\something with spaces",());

which should also work

--
Tal Kelrich
PGP fingerprint: 3EDF FCC5 60BB 4729 AB2F  CAE6 FEC1 9AAC 12B9 AA69
Key Available at: http://www.hasturkun.com/pub.txt
----
Kindness is the beginning of cruelty. -- Muad'dib [Frank Herbert,
"Dune"]
----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://perl.org.il/pipermail/perl/attachments/20040927/fbaf4c17/attachment.pgp
```

More information about the Perl mailing list