On Sat, 2007-08-25 at 16:36 -0300, Rodrigo Tavares wrote:
> if (($num1 >= 1 && $num1 <= 30)
> {
> for (my $i=1 ; $i < 30 ; $i++)
> {
> while ($num1 == $i)
> {
> print "*";
> }
> }
> }
Think in terms of values: Use 6 instead of $num1 and think about what
it says.
if ((6 >= 1 && 6 <= 30) # yes this works
> {
> for (my $i=1 ; $i < 30 ; $i++)
> {
> while (6 == $i) # infinite loop because $i does not change.
> {
> print "*";
> }
> }
> }
--
Ken Foskey
FOSS developer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/