in reply to Re: processing on the command line
in thread processing on the command line
"or do i miss something in your question?"
I think you missed the part of the spaces and backslashes. To use your code, the input should be quoted (apostrophe) or escaped (backslashes):
$ cat script.pl my $directory = shift @ARGV; print $directory."\n"; $ perl script.pl 'c:\Documents and Settings\All Users' c:\Documents and Settings\All Users $ perl script.pl c:\\Documents\ and\ Settings\\All\ Users c:\Documents and Settings\All Users
Update Thanks to Corion I should add this disclaimer: "varying on the shell in use" ;)
|
|---|