<quote> For historical reasons, the foreach keyword is a synonym for the for keyword, so you can use for and foreach interchangeably, whichever you think is more readable in a given situation. We tend to prefer for because we are lazy and because it is more readable, especially with the my. </quote>
1) For historical reasons we regard the world as flat. It remains so for compatibility purposes! *ahem*.
<quote> (Don’t worry—Perl can easily distinguish for (@ARGV) from for ($i=0; $i<$#ARGV; $i++) because the latter contains semicolons.) </quote>
2) Eh? Now this sounds like a bug .. implementation not following design. Mine DID contain semicolons which were ignored and cast off as warnings or errors (w/parens). That seems a case of implementation not following intent of design, no?
p.s.- for compatibility reasons <quote> is not? supported?
In reply to Re^4: Why/how are these different?
by perl-diddler
in thread Why/how are these different?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |