The stupid question is the question not asked | |
PerlMonks |
Re: "or die" versus "|| die"by jeffa (Bishop) |
on Jun 24, 2005 at 14:56 UTC ( [id://469727]=note: print w/replies, xml ) | Need Help?? |
In your example it doesn't matter. One binds more tightly than the other, is the only real difference -- well, that and readablilty. || binds tighter. So, if you want to die after an assignment use or: And if you want a default value, use ||
jeffa L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In Section
Seekers of Perl Wisdom
|
|