in reply to Reading parts of array elements

for(@foo){ print "got x $_\n" if /^x/; }
perlintro, perlretut, index, substr