$datasource=$ENV{'datasource'}; opendir(DIR, "$datasource"); my @inhalt = readdir(DIR); print @inhalt,"\n"; closedir(DIR); system ("rm", "$datasource"); #oder…. system ("rm", "@inhalt");