May I see a POC with prototypes for that?
Because this
> sub catchif ($&;@)will require a sub before and a comma after the block.
You are right. It would have been too easy. ;-) perlsub is quite clear:
An & requires an anonymous subroutine, which, if passed as the first argument, does not require the sub keyword or a subsequent comma.
I did not remember the "first argument" exception and assumed an anonymous sub would work in any position.
Alexander
In reply to Re^6: conditional catch-blocks 'try {} catch(COND) { }'
by afoken
in thread conditional catch-blocks 'try {} catch(COND) { }'
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |