foreach (@machine) { if (-e "//$_/c$/Program Files/KaZaA Lite/kazaa.exe") { print "KAZAA LITE IS INSTALLED ON $_.\n"; } else { print "Kazaa lite was not detected on $_.\n"; } if (-e "//$_/c$/Program Files/Kazaa/kazaa.exe") { print "KAZAA IS INSTALLED ON $_.\n"; } else { print "Kazaa was not detected on $_.\n"; } }