good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: foreach loopby alfie (Pilgrim) |
on May 02, 2001 at 19:40 UTC ( [id://77366]=note: print w/replies, xml ) | Need Help?? |
Because $_ is only available in the scope of the current
block. So after the foreach block is finished $_ refers to
the read line.
Btw.: You should have expected
Suaveaniakobskmerlyboo_radle for using the chop ;-)
In Section
Seekers of Perl Wisdom
|
|