http://qs321.pair.com?node_id=782773


in reply to factorial through recursion

In addition to missing braces in the if-statement, you have a problem with this line:
my($num1,$flag)=shift;
shift only returns one element from @_. You probably mean:
my($num1,$flag)=@_;

blokhead