Yep ... that's obviously correct. My question was 'WHY'. I would have assumed that the end-of-file information does not get lost when I used the diamond operator to read the input files line by line. Why is the code I posted not behaving equivalently to
in reply to Re: eof not recognised when applying diamond operator to invocation arguments?
in thread eof not recognised when applying diamond operator to invocation arguments?
which prints the contents of the first file, then the separator, then the contents of the second file and the separator again.
while( <> )
print "========================== Now at $ARGV ===================
+=======\n" if eof;