# to get UNITAS_* folders in directory my @folders = glob "UNITAS_*"; # to speak to each element in directory foreach my $folder ( @folders ) {