in reply to Getting a simple directory listing

Howdy Stamp Guy, On my windows 98 machine your script worked fine when I specified the full path of the desktop ie.
  opendir(TEXTFILES, "c:/windows/desktop") || die "Couldn't open the text file directory

When I didn't do that, die kicked in and gave me your warning.

HTH,

Update Okay, so everyone types faster than I do..:) Another thing you might want to do is

$dir = "c:/windows/desktop"; chdir $dir or (warn "Cannot chdir $dir: $!" and next); opendir(TEXTFILES, "$dir") || die "Couldn't open the text file directo +ry

Granted that is a bit pedestrian, but I like it when it is obvious.

EEjack