in reply to How to escape white space in command line arguments
#!/usr/bin/perl -w use strict; #file: testargv.pl my $parms = 'a b c abc "some gizmo" d32'; print `perl argv.pl $parms`; __END__ prints a b c abc some gizmo d32 ===== file argv.pl ======== #!/usr/bin/perl -w use strict; #file: argv.pl foreach (@ARGV) { print "$_\n"; } ==example of command line input to argv.pl ==== C:\TEMP>perl argv.pl "some thing" "some other thing" d x "xy z" some thing some other thing d x xy z
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to escape white space in command line arguments
by JavaFan (Canon) on Apr 13, 2010 at 07:08 UTC | |
by Marshall (Canon) on Apr 13, 2010 at 08:19 UTC | |
by JavaFan (Canon) on Apr 13, 2010 at 13:59 UTC | |
by Anonymous Monk on Apr 13, 2010 at 08:25 UTC | |
by Marshall (Canon) on Apr 13, 2010 at 08:57 UTC | |
by Anonymous Monk on Apr 13, 2010 at 09:38 UTC | |
|