> $check = sub (;$$$$) {
> @_==0 ? __ < 2 + __ * atan($pi/__) or die __
> : @_==1 ? $_[0] < 2 + __ * atan($pi/__) or die __
> : @_==2 ? $_[0] < 2 + $_[1] * atan($pi/__) or die __
> : @_==3 ? $_[0] < 2 + $_[1] * atan($pi/$_[1]) or die __
> : $_[0] < 2 + $_[1] * atan($pi/$_[1]) or die $_[1]
> ;
> };
>
Unless I'm missing something here, you're not filling in the args correctly.
I think you mean:
$check = sub (;$$$$) {
@_==0 ? __ < 2 + __ * atan($pi/__) or die __
: @_==1 ? $_[0] < 2 + __ * atan($pi/__) or die __
: @_==2 ? $_[0] < 2 + $_[1] * atan($pi/__) or die __
: @_==3 ? $_[0] < 2 + $_[1] * atan($pi/$_[2]) or die __
: $_[0] < 2 + $_[1] * atan($pi/$_[1]) or die $_[3]
;
};
> Arguments other than the last can also be bound by the explicit use of
> placeholders:
What do you mean 'other than the last'. Isn't your example showing that
_all_ the arguments can get bound?