Internet Marketing Business Forum


Internet Marketing Business Forum » MAIN FORUMS » Web Design & Programming » Need Help with Perl Loop.?
Web Design & Programming Building websites, coding scripts or developing apps? html, css, javascripts, ajax, php, asp, java, c+, C++ and other geeky info is here.

Reply
 
LinkBack Thread Tools Display Modes
Old 08-01-2009, 05:20 AM   #1 (permalink)
 gingersnapgrad2003's Avatar
 
Status: Junior Member
Join Date: Jul 2009
Posts: 3
gingersnapgrad2003 is on a distinguished road
Default Need Help with Perl Loop.?

How do I get it to stop being either all true or all false. It either keeps in the loop and won't let me out or won't loop at all. I want it to keep doing the program if I answer yes to "Would you like to do another?" and stop the loop if you answer no. What do I need to do?
I have:
while ($again = 'y')
{
blah blah blah

print ( "Would you......\n");
$again = <STDIN>
}

I have even put an if statement in too.
if ($again = 'n')
{
exit 0;
}
gingersnapgrad2003 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Reply
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 09:11 AM.
Powered by vBulletin® Version 3.7.0 Beta 6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.


Nav Item BG