diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IO/Pty/Easy.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IO/Pty/Easy.pm b/lib/IO/Pty/Easy.pm index b07154f..590b3ec 100644 --- a/lib/IO/Pty/Easy.pm +++ b/lib/IO/Pty/Easy.pm @@ -25,7 +25,7 @@ our $VERSION = '0.01'; my $pty = IO::Pty::Easy->new; $pty->spawn("nethack"); - while (1) { + while ($pty->is_active) { my $input = # read a key here... $input = 'Elbereth' if $input eq "\ce"; my $chars = $pty->write($input, 0); |