Brian Volk wrote:
Below is the program I'm using... It works but I'm getting an error
message...

"Name ... used only once: possible typo ..." is not an error message, it's a warning message.

Can you please tell me what I'm doing wrong?

You are not using strict.

PS: The program will not fun if I use strict;

Yes it will, provided that you my() declare $dir and get rid of the redundant outer while loop.

11 @ARGV = grep { !/^\./ } readdir BIN;

Hmm.. Since it was me who suggested that (in another thread), I'd better mention that readdir() only returns the actual file names, so it only works either if the directory you want to explore happens to be the working directory or if you set the working directory using chdir().

Bob's suggestions would populate @ARGV with the full paths to the files.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to