There's more than one way to do things | |
PerlMonks |
Re^4: Programming in Perl without semicolonby JavaFan (Canon) |
on Jan 31, 2009 at 10:20 UTC ( [id://740403]=note: print w/replies, xml ) | Need Help?? |
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'.
In Section
Cool Uses for Perl
|
|