in reply to creating operands
This operator is called "defined-or". In Perl, it written as //; there is also a low-priority form, err.
I believe these were introduced in core Perl as of 5.9.2. They are also in Perl 6.
So, for your example, you'd do
$foo = $bar->id err $self->error('blah blah');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: creating operands
by diotalevi (Canon) on Jul 13, 2006 at 19:52 UTC |