in reply to perl loop counter
Because unless otherwise specified a foreach loop (which can also be spelled for as you've done) uses the usual default variable $_, and likewise if not given an explicit argument print prints the contents of said default variable.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|