Hi all, this guy isn't working, and from what I know it seems like it's correct.
If anyone could troubleshoot this guy, I'd really appreciate it.
Just a basic Yes/No loop that if the answer isn't "Yes" or "No" tells them to answer as such.
Thanks!
Code:
print "Would you like to update the tree (recommended) [Yes/No]?" ;
$update = <STDIN>;
chomp ($update);
$i = 0; # Set count
while $i = 0; {
if ($update eq "Yes") {
$i = $i + 1;
system ("clear");
print "Updating CVS tree, standby...\n";
qx (cvs update -A);
print "Finished. Hit Enter to continue.\n";
$_ = <STDIN>;
} elsif ($update eq "No") {
$i = $i + 1;
print "\nContinuing without update, please hit Enter to continue.\n";
$_ = <STDIN>; # Blank Variable for CR
} else {
print "Please answer Yes or No.\n";
chomp ($update);
$i = 0;
}
}