> Admin wrote: >> Shawn H. Corey wrote: >>> Admin wrote: >>>> Hi there, >>>> >>>> is there a page that explains the ||= operator and similar operators? >>>> google is not quite finding the special characters in the first 10 hits. >>>> >>>> >>> >>> See http://perldoc.perl.org/perlop.html#Assignment-Operators >>> >>> >> >> >> thanks Shawn But I searched the page and there is nothing discussing ||= >> >> > > You're right. The operator only appears once and is not explained. The > best it does is infer how it might work. And as for the C reference... > It's about time the perldocs are redone; made more complete and without > any references to other languages.
I think it's saying that just like: $a += 2; is the same as: $a = $a + 2; similarly: $a ||= 3; is the same as: $a = $a || 3; ... implying if $a is false, $a gets set to 3, otherwise it stays at whatever it was. - B -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/