Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^4: Why/how are these different?

by perl-diddler (Chaplain)
on Jan 31, 2013 at 19:41 UTC ( #1016382=note: print w/replies, xml ) Need Help??

in reply to Re^3: Why/how are these different?
in thread Why/how are these different?

Ok, I gotta love this part:

<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?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016382]
[LanX]: expense? .... meeting ppl is inspiring ...
[LanX]: ... and it might be your last chance ... I heard Perl is dead! OO
[marto]: someone read the post about search.cpan being shut down, and commented "It's going to be awhile before I learn to not type "" into my address bar."

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2018-06-20 09:40 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.