in reply to
program hangs on user input
This code might not do what you expect if there is something in
@ARGV
. The diamond operator
<>
will try to read files specified in
@ARGV
(command-line arguments) before reading STDIN if none are present. So it is safer to:
$resp = <STDIN>;
[download]
Comment on
Re: program hangs on user input
Select
or
Download
Code
Replies are listed 'Best First'.
Re^2: program hangs on user input
by
equick
(Acolyte)
on Jan 28, 2011 at 12:13 UTC
Thanks, that's a good tip.
[reply]
In Section
Seekers of Perl Wisdom