my @emptyfiles = grep { /^\d+$/ } grep { -f } [ 1 temp.dat testdirectory 10 resume.wd ]