You might also consider using File::Util, as well. Its designed for just this sort of activity, ONCE you have passed your directory name into the script, that is.
-- Hugh
if( $lal && $lol ) { $life++; }
Comment on Re: Directory name as command line argument