in reply to How to escape white space in command line arguments


Yes, by avoiding the escape effort.

Keep arguments separate by maintaining them in a list - don't interpolate the array into the string:
my @args = ("C:/Program Files/Perl Express/sample.txt", "some hash"); system($^X, "/path/to/the/script", @args);

Replies are listed 'Best First'.
Re^2: How to escape white space in command line arguments
by GoForIt (Novice) on Apr 13, 2010 at 13:12 UTC
    Hi,

    That works. I was passing the @args in double quotes and that's precisely was the mistake.

    Thanks for helping me out.

    Thanks,