vinoth.ree has asked for the wisdom of the Perl Monks concerning the following question:
I got this question from this site
questionThey would have given some answers, but I did not get the clarification, thats why I posted this question here to get more clarification I am sorry that I not informed the site where I got this question pardon me! please
I have a filehandle FILE in Perl, and I want to iterate over all the lines in the file. Is there a difference between the following?
while (<FILE>) { # do something } and foreach (<FILE>) { # do something }
Vinoth,G
Back to
Seekers of Perl Wisdom