Re: AW: Array, foreach problem

2010-05-05 Thread Shawn H Corey
Thomas Bätzler wrote: Brian asked: foreach $line () { while (my $line = <$logfile>) would be a better idea than foreach $line. Just curious for an explanation to this. I tend to use foreach too. Don't they both accomplish the same thing? :) "foreach ()" means that the whole file w

AW: Array, foreach problem

2010-05-05 Thread Thomas Bätzler
Brian asked: > >> foreach $line () { > > > > while (my $line = <$logfile>) would be a better idea than > > foreach $line. > > Just curious for an explanation to this. I tend to use foreach too. > Don't they both accomplish the same thing? :) "foreach ()" means that the whole file will