Rich36 has asked for the wisdom of the Perl Monks concerning the following question:
For example,
I've been trying to figure out a way to set $/ to make it work, but I haven't been able to figure out how yet.
Should yield (but doesn't...)print qq(Please enter a character: ); $/ = ???; my $ans = <STDIN>; undef $/; print qq(\nYour character is '$ans'\n);
Any help would be appreciated.Please enter a character: x Your character is 'x'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: stdin problem
by jeffa (Bishop) on Oct 10, 2001 at 01:31 UTC | |
by Rich36 (Chaplain) on Oct 10, 2001 at 01:53 UTC | |
by Fletch (Bishop) on Oct 10, 2001 at 22:02 UTC | |
|
Re: stdin problem
by kschwab (Vicar) on Oct 10, 2001 at 01:28 UTC |