Use the functions opendir, readdir, and closedir
#!/usr/local/bin/perl -w opendir (DIRHANDLE, "."); @filelist = readdir (DIRHANDLE); closedir (DIRHANDLE); foreach $file (@filelist) { print "File: $file\n"; }