B
Bill Smith
My apology in advance to any who may consider this a Win32 question
rather than a perl question.
I recently bought the O'REILLY book "Learning Perl on Win32 Systems".
The introduction indicates that some modules that work under NT will not
work under other version of windows. There is no indication that basic
I/O might be different.
My problem is that none of the solutions to Chapter 3 Exercise 1 work on
my system (AS Perl v5.6.1 under Windows ME).
EXERCISE
1. Write a program that reads a list of strings on separate lines and
prints out the list in reverse order. If you're reading the list from
the console, you'll probably need to delimit the end of the list by
pressing CTRL-Z.
ANSWER
print "Enter the list of strings:\n";
print reverse <STDIN>";
The result using console input is correct except that the last line of
input is not printed.
I have searched the AS documentation and perldoc -q for "CTRL-Z" and for
"end-of-file" without success. Would someone here please explain the
problem and suggest a perl solution.
TIA,
Bill
rather than a perl question.
I recently bought the O'REILLY book "Learning Perl on Win32 Systems".
The introduction indicates that some modules that work under NT will not
work under other version of windows. There is no indication that basic
I/O might be different.
My problem is that none of the solutions to Chapter 3 Exercise 1 work on
my system (AS Perl v5.6.1 under Windows ME).
EXERCISE
1. Write a program that reads a list of strings on separate lines and
prints out the list in reverse order. If you're reading the list from
the console, you'll probably need to delimit the end of the list by
pressing CTRL-Z.
ANSWER
print "Enter the list of strings:\n";
print reverse <STDIN>";
The result using console input is correct except that the last line of
input is not printed.
I have searched the AS documentation and perldoc -q for "CTRL-Z" and for
"end-of-file" without success. Would someone here please explain the
problem and suggest a perl solution.
TIA,
Bill