--- Bob Bondi <[EMAIL PROTECTED]> wrote:
> I've been trying to use
> opendir($tempdir,@ARGV[0]) or die "Couldn't open the directory,
$!";
...use $ARGV[0], not @ARGV[0]....
^ ^
> Can't use string ("tempdir") as a symbol ref while "strict refs" in
> use at run test4.pl line 58.
>
> So, is there a snippet, please, that will do this?
You could say
opendir DIR, $ARGV[0] or die $!;
though that isn't recurseable. Try
use FileHandle;
my $tmpdir = new FileHandle;
opendir $tempdir, $ARGV[0] or die "Couldn't open $ARGV[0]: $!";
(FileHandle objects work for opendir, too, right?)
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]