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

[MacPerl] Problems with the "-x" file tests




I'm having a problem that's almost certainly attributable to my 
stupidity, and i'd appreciate the lists' help:

...given the following:


foreach $item (@list) {
	if (-d $item) {
		print "directory: $item\n";
	}else{
		print "$item\n";
	}
}

...where we have a list of files & directories in @list, why does the 
"-d" test never evalate to true?  If I use "-e" to test for existance it 
never works either, leading me to conclude that 1) those operators are 
broken or b) i'm an idiot.


...anyone care to tell me if it's (a) or (b)?  ...and yes, this is my 
first day with Perl.



thanks

- bill


----------------------------------------------
Bill Hutten db+www         bhutten@cochran.com
Cochran Interactive



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch