in reply to Does this user exist?

This should do what you want:

opendir(DIR, '.') || die("Can't open dir"); my @dirs = grep(/^\w/, readdir(DIR)); closedir(DIR); if (grep(/^$username$/, @dirs)) { print "yes\n"; }
Hope this helps, -gjb-