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

[MacPerl] Simple OpenDir problem



	What's wrong with this code?

print "Attempting to open current directory" . `pwd` . "...\n";
opendir(DIR, `pwd`) or die 'cannot open directory';
@files = readdir(DIR);
#closedir(DIR);
foreach $file (@files) {
     print("$file\n");
}


	Returns..

Attempting to open current directoryTYikes!:Desktop Folder:Palm 
installations:showtimes
...
# cannot open directory.
File 'TYikes!:Desktop Folder:Palm installations:showtimes:test.pl'; Line 3

	Note, it seems to work fine for ':' and relative pathnames 
but not for `pwd` or absolute pathnames.

	Thanks!

	terry

chay@uiuc.edu           mac:<http://phy290p.physics.uiuc.edu/pgp/eCard.sit.bin>
terrence y chay 
homepage:<http://www.pws.uiuc.edu/~tychay/>
department of physics             pgp key:<http://phy290p.physics.uuc.edu/pgp/>
university of illinois, urbana-champaign      icq:<http://wwp.icq.com/16069322>

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