$path = `cd`; chop $path; opendir MYDIR, $path; print "Path:\n$path\n"; while ( $file = readdir(MYDIR)) { print "File: ", $file, "\n"; }