Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The problem is, it doesn't allow input for the $message. It immediately prints the destination line and then waits for that input. Do I need to clear STDIN or something?Please help me!!!sub SendMessage{ my $self=shift; print "Please enter message:\n"; my $message=<STDIN>; print "Please enter destination of message:\n"; my $to=<STDIN>; }
thanks, anon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: clear STDIN
by Belgarion (Chaplain) on Apr 21, 2004 at 18:23 UTC | |
|
Re: clear STDIN
by Fletch (Bishop) on Apr 21, 2004 at 18:51 UTC | |
|
Re: clear STDIN
by Zaxo (Archbishop) on Apr 21, 2004 at 18:36 UTC | |
|
Re: clear STDIN
by TilRMan (Friar) on Apr 22, 2004 at 04:37 UTC |