perlquestion
stevieb
<p>Looking at making some changes to a module that loops over an array (actually a list, handed off from a file handle, where I'd like to loop on the handle itself).</p>
<p>Internally, do <c>for()</c> and <c>while()</c> do the same thing, ie., are the following equivalent?:</p>
<c>
for (<$fh>){
print;
}
while (<$fh>){
print;
}
</c>
<p>With that simple example, they seem to do the same thing (in v5.22 on Linux Mint at least). But below the surface, do they really?</p>
<p>-stevieb</p>