my $time = sub { localtime() }; foreach my $allfilesfound (@dir_contents) { print "This file=$allfilesfound took ".$time->()." to open
"; }