#!/usr/local/bin/perl ### Program to illustrate the foreach construct. @users = ( zhanyun, serguei, cvenkata, xuefeng, kangy, naomi, eme, mihails, orkun, haipeng, waterm, katrina, andrea, erica, nliu ); foreach $user (@users) { if (-e "/home/$user/public_html/cgi-bin/hello_world.pl"){ print "Looks like $user did their homework\n"; } else { print "Looks like $user did not do their homework\n"; } }