in reply to Reading a directory into an array using <>

to say get only the directories in my temp directory, you can use the glob() function:
#!/usr/bin/perl -w use strict; my $path = 'C:/temp/'; my @filearray = grep{-d}glob("$path*"); print join("\n",@filearray);