curtisb has asked for the wisdom of the Perl Monks concerning the following question:
How can I set this to a variable called $workdir? Then have the code do a chdir to that directory for opening, reading and closing? Here is the top portion of my sub routine.&scandir("c:/mydocu~1");
Yes, I am using strict on this one. Can someone suggest something. I have spent hours on this one. curtisb -- "Becareful what you wish for, you might get it!!"sub scandir { my ($workdir) = shift; chdir($workdir) || print "Unable to change to $workdir: $!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Setting a path for a sub function
by Fastolfe (Vicar) on Nov 13, 2000 at 04:52 UTC | |
|
Re: Setting a path for a sub function
by the_slycer (Chaplain) on Nov 13, 2000 at 08:31 UTC | |
|
Re: Setting a path for a sub function
by AgentM (Curate) on Nov 13, 2000 at 03:24 UTC |