The IDE jogling the code, placing and mixing statements!
Brought to you by:
jguentherodt
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
print "What is your name? ";
$name = <STDIN>;
print "Hello $name";
The above program on XP would only 'print' any of the
many statements above after you press <CR>.
Logged In: YES
user_id=105669
I was about to write a bug on this as well. The debugger
will not process execute until ALL <STDIN> are processed.
Try this:
print "What is your username? "; # print out the question
my $username; # \declare" the variable
$username = <STDIN>; # ask for the username
print "Hello, $username"; # print out the greeting
my $username2 = <STDIN>;
print "Hello, $username2";
Instead of executing sequentially, inputs are required first.