in reply to Syntax trouble?
else { ($num=$num1++); print $num; print "\n"; }
an then you want to loop, but without test (that should be == not =) and you are confusing until with unless (see perlsyn#Compound Statements)
unless ($num1=$num2) { print $num2; }
IMHO you wanted something like
else { $num=$num1; while ( $num <= $num2 ) { print $num; $num++ } }
Cheers Rolf
UPDATE: corrected $num != $num1 confusion
|
|---|