in reply to For Syntax Question

threshbarg,
Larry's formal training makes him a linguist. One of the main design goals of Perl is so that it is a "natural" language. Basically that means you can write your code the way you might speak it. The two main ways of doing this is:

The latter takes a block {} and can be very complex. The former needs to pretty much be a single statement. You can use the low precendence operators like and/or to link a few but you strike out when you try and put conditionals like if in there.

So to answer your question: In each iteration of the loop, $_ (see perldoc perlvar) is replaced with the value (actually it is an alias) of the index being iterated over in @e. That value is being added to the current value of $foo

Cheers - L~R