in reply to Re^3: Programming in Perl without semicolon
in thread Programming in Perl without semicolon
Unfortunally, it's not a general technique. It works here because 'fib(0)' is supposed to return '0'; the block isn't executed if the argument of the function is 0.But it can be written as:
and then it will always do the 'do'.local our ($n, $m) = (shift, 0)) && do { }
|
|---|