[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] NEWBIE problem with -d and -f



On Thu, Feb 10, 2000 at 12:12:31PM -0600, J.O'Dell wrote:

> 	while(defined($file=readdir DIR)){
> 		#print the name if it is not a directory(should exclude
> only directories)
> 		print "file is $dir:$file\n" unless -d $file;
                                                      ^^^

You forgot to prepend the path here.


> 		if(-f ($dir.$file)){
                          ^^^

You forgot the path separator here.


Ronald

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org