Anarion has asked for the wisdom of the Perl Monks concerning the following question:
anarion@foo:~$ perl -le 'sub a{my$c=pop;print $c;$c*a($c-1)unless!$c}p +rint a(--$ARGV[0])' 5 4 3 2 1 0 24 anarion@foo:~$ perl -le 'sub a{my$c=pop;print $c;$c*a($c-1)if$c}print +a(--$ARGV[0])' 5 4 3 2 1 0 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: isn't unless ! $c the same than if $c ?
by Chmrr (Vicar) on Apr 03, 2002 at 23:32 UTC | |
|
(MeowChow) Re: isn't unless ! $c the same than if $c ?
by MeowChow (Vicar) on Apr 03, 2002 at 23:41 UTC |