Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I know some information can be entered on the command line, but what about a directory path? For example I would like to have my script (in this case - script.pl) use the directory information contained after the script is called. For example at the prompt type:
perl script.pl c:\Documents and Dettings\All Users
And when return is pressed, "c:\Documents and Settings\All Users" is assigned to a scalar in the script for later use.
Could this be done using GetOpt? or @ARGV?
Any help would be much appreciated
Jonathan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: processing on the command line
by BrowserUk (Patriarch) on Mar 02, 2004 at 15:09 UTC | |
|
Re: processing on the command line
by dragonchild (Archbishop) on Mar 02, 2004 at 15:06 UTC | |
|
Re: processing on the command line
by tinita (Parson) on Mar 02, 2004 at 14:59 UTC | |
by b10m (Vicar) on Mar 02, 2004 at 15:09 UTC | |
| |
|
Re: processing on the command line
by blue_cowdawg (Monsignor) on Mar 02, 2004 at 15:27 UTC |