S
Sverre Furberg
Probably OT but...
The output of the script below isn't
what I expect.
Tested it on a computer
with ActivPerl 5.8.6 on MS Win98 SE.
---
#/usr/bin/perl
use warnings;
use strict;
my @lines;
while (<>) {
push @lines, $_;
}
print reverse @lines[-5 .. -1];
---
When I run the script with:
C:\Temp>d_test.plx
one
two
three
four
five
<CTRL>-z
the output is:
four
three
two
one
without printing 'five' first.
Is this a Ms-Dos issue or
am I doing something wrong?
TIA
Sverre
The output of the script below isn't
what I expect.
Tested it on a computer
with ActivPerl 5.8.6 on MS Win98 SE.
---
#/usr/bin/perl
use warnings;
use strict;
my @lines;
while (<>) {
push @lines, $_;
}
print reverse @lines[-5 .. -1];
---
When I run the script with:
C:\Temp>d_test.plx
one
two
three
four
five
<CTRL>-z
the output is:
four
three
two
one
without printing 'five' first.
Is this a Ms-Dos issue or
am I doing something wrong?
TIA
Sverre