foreach $vob (@vobs) { # get all files under each vob my @names = grep -f, ; }