I've been told EOF should be control-z. But when I use control-z the program
terminates.  In the attached example pressing control-z terminates the
program without printing EOF.

Is there some option I need to set, or another control character I should be
using?  I really want to terminate STDIN input with a single key (like ctl-D
on Unix).

#!/usr/local/bin/perl
#
# I/O Basics 1

print "Enter name: ";
while (defined($line = <STDIN>)) {
  chomp $line;
  print "It was $line.\nEnter next: ";
}
print "EOF";

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to