for my $sd (@dirs) { system("cd $sd"); system("gunzip *.gz"); }