P is for Practical | |
PerlMonks |
Re^5: SIMPLE way to write these?by GotToBTru (Prior) |
on Feb 04, 2014 at 15:04 UTC ( [id://1073411]=note: print w/replies, xml ) | Need Help?? |
You are comparing $number2 and $number1 in your while; neither ever changes. That's why you get an infinite loop. Here is a solution that preserves the value in $number1.
In Section
Seekers of Perl Wisdom
|
|