in reply to Parsing Windows CommandLine from Perl

You can do it that way but a really good way is to use Getopt::Long

untested

# my program # test.pl use strict; use Getopt::Long; my $Dir; GetOptions ( "Dir=s" => \$Dir, );
test.pl --Dir c:/path

Replies are listed 'Best First'.
Re^2: Parsing Windows CommandLine from Perl
by fishmonger (Chaplain) on Apr 17, 2015 at 16:47 UTC

    Using Getopt::Long is a better approach to passing args, but that doesn't answer the escaping question the OP is asking abut.