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 ||my $foo = $bar->fetch('baz') or die "something went wrong\n";
my $foo = $bar->fetch('baz') || 'default';
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 reply to Re: "or die" versus "|| die"
by jeffa
in thread "or die" versus "|| die"
by ghenry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |