input <>; not working?
From: Billy (bustanut2020_at_yahoo.com)
Date: 12/22/04
- Next message: John Woodgate: "Re: Is zero even or odd?"
- Previous message: John Woodgate: "Re: Is zero even or odd?"
- Next in thread: A. Sinan Unur: "Re: input <>; not working?"
- Reply: A. Sinan Unur: "Re: input <>; not working?"
- Reply: ajs_at_ajs.com: "Re: input <>; not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 22 Dec 2004 04:17:59 GMT
I ran into a problem that I went round-and-round on until I broke an input
to the simplest test code I could think of and it still doesn't work...
print "Enter a number: ";
$number = <>;
print "The number is $number.\n";
or
$number = <STDIN>;
print STDOUT "The number is $number.\n";
What happens with both attempts is it prints:
Enter a number: The number is.
without pausing for an input.....
All other parts of my code works except when I want to get an input from the
keyboard....
What am I missing?
Billy
- Next message: John Woodgate: "Re: Is zero even or odd?"
- Previous message: John Woodgate: "Re: Is zero even or odd?"
- Next in thread: A. Sinan Unur: "Re: input <>; not working?"
- Reply: A. Sinan Unur: "Re: input <>; not working?"
- Reply: ajs_at_ajs.com: "Re: input <>; not working?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]