On Fri, Sep 11, 2009 at 10:36, John W. Krahn <jwkr...@shaw.ca> wrote: snip >> If C can document ?: properly, why can't perl? The size of each >> language has nothing to do with this. > > perldoc perlop > [ SNIP ] > Conditional Operator > > Ternary "?:" is the conditional operator, just as in C. > > > You apparently have the C documentation (I don't) so you should be able to > look it up there, although it may be on the interweb somewhere. snip
The problem is that the conditional operator does not behave the same in Perl and C. The Perl version can do more things (e.g. it can be an lvalue). This calls into question how much of the behavior from C made it into Perl. If you are looking for a guarantee of the behavior he is talking about, you won't find one. We just take it on faith that Perl is not absolutely stupid in its implementation of it. This faith is not misplaced because if it did violate the expected behavior it would be documented (just as the lvalue difference is documented). The Perl 5 online documentation's biggest failure is that it expects a lot from its audience. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/