in reply to Please help...not certain why my code does not work.

for ( $i = 0; $i <= $num; i++) {              # something is wrong here
i++ should be $i++

for($j = $i+1; $j = $num; $j++) {
$j = $num; should be $j == $num;
although I doubt that's what you want, you probably want $j <= $num;

dunno about the }... Update tried the code for subroutine with fixed code, no error on that }

                - Ant

Replies are listed 'Best First'.
Re: Re: Please help...not certain why my code does not work.
by Satanya (Novice) on Jun 05, 2001 at 00:43 UTC

    Thanks for your help. Greatfull trainee