in reply to dos EOF in linux

I think that a quick demonstration is in order. On the winblows system, do the following:

Open an MS-DOS box (command prompt) and type the following:

copy con new.txt this is line 1 this is line 2 this is line 3 ^Z
(where ^Z represents pressing control-z)

Now in your favorite text editor, save the following as new.pl (or whatever you want) in the same location as new.txt:

open(NEW,"<","new.txt"); while ( my $line = <NEW> ) { chomp $line; process_line($line); } close(NEW); sub process_line { my $line = shift; my @chars = split//,$line; print ord($chars[0]),$/; # print the character number of the first c +haracter of $line print $line,$/; }

When you run new.pl, you will see that it never reaches the line with the EOF character on it.