my @array = ('paint.exe', 'photo.exe'); foreach (@array){ system($_) or die; }