Please clarify your post a bit.
My program does something like this:
(run)
(does nothing...)
(type in 'John')
JohnEnter your name
Hello John!
Shouldn't it show me "Enter your name" before it waits for my input(e.g. "Enter your name John Hello John!")?
Hi,
I'm just starting to learn Perl and I'm a bit confused. I have a program like this:
print "Enter your name!\n";
$name = <STDIN>;
print "Hello $name!\n";
The problem is that when I run it, it sits there waiting for input, after which it will display the "Enter your name" and "Hello" lines...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.