opendir dhandle,"log"; @dots = grep { /^log/ } readdir(dhandle); for $item(@dots) { @files=`ls -l $item`; print @files; }