Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   Perl (http://www.domainnameforum.org/forumdisplay.php?f=129)
-   -   how can i use a variable outside its while loop? (http://www.domainnameforum.org/showthread.php?t=124142)

webdev 09-14-2010 09:00 AM

how can i use a variable outside its while loop?
 
Im following a perl book, and one exercise has you enter a number, sum them up until you type 999(the exit code). Their example works, but when I try using use strict, I cant figure out how to get the variable in the while loop to go global Here's what I tried: <div class="codeblock">


All times are GMT -4. The time now is 08:13 AM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.