perlquestion
hnd
why is this piece of code not working?<br>
it shows a syntax error at line 10 and 13<br><br>
<code>
#factorial through recursion
use strict;
use warnings;
print "enter number\n";
my $num=<>;
&fact($num,1);
print "factorial: \n";
##################
sub fact
{
my($num1,$flag)=shift;
if($num1==0)
print "$flag" and die "brrrrrrrreeeeeee :D\n";
else
{fact($num1-1,$num1*$flag);}
}
</code>
<div class="pmsig"><div class="pmsig-771381">
=====================================================<br>
i'am worst at what do best and for this gift i fell blessed...<br>i found it hard it's hard to find well whatever<br><b>NEVERMIND</b>
</div></div>