You shouldn't use prototypes unless necessary, because of their side-effects. In this case, the prototype isn't even being checked because you're using a reference to the function.
sub test($) { print("Boo!\n"); } my $f = \&test; $f->(); # No error. Prints "Boo!". $f->(1, 2, 3); # No error. Prints "Boo!".
And why bother with ?1:0 and ?0:1 since == already returns a boolean value.
In reply to Re^2: Is it possible to store an arthimetric operator in a variable?
by ikegami
in thread Is it possible to store an arthimetric operator in a variable?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |