|
|
|
Your skill will accomplish what the force of many cannot |
|
| PerlMonks |
||= (poorly documented?)by live4tech (Sexton) |
| on Jul 09, 2012 at 05:43 UTC ( [id://980650]=perlquestion: print w/replies, xml ) | Need Help?? |
|
live4tech has asked for the wisdom of the Perl Monks concerning the following question: I recently came upon the following line of code:
I have looked for the ||= operator and found it only in a table in perlop. There is no description of it or examples using it. I have not found it anywhere else. From the context of the above code line and through some testing I found that the line works like this: $FH will be set to $OUTFH{$name} if $OUTFH{$name} is defined. If $OUTFH{$name} is undefined, $FH is set to the IO::File reference. Is this the same as //? This is really poorly documented...
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||