in reply to Getting a simple directory listing

The problem is that you are opening the directory "desktop" for reading, but you are testing each entry under the current directory. Changing the following line makes it work:
print if (-d "./desktop/$_");

--ZZamboni

Replies are listed 'Best First'.
Getting a simple directory listing
by Stamp_Guy (Monk) on May 01, 2001 at 04:41 UTC
    Thanks everyone. ZZamboni's suggestion worked perfectly.