http://www.perlmonks.org?node_id=881951


in reply to eof not recognised when applying diamond operator to invocation arguments?

Just in case you're curious...  If you wanted to stick with your original code as closely as possible, here's how you'd have to modify it to get it working as desired (I wouldn't recommend it though):

my @filesnames = @ARGV; for my $input_file ( @filesnames ) { eof(); while ( ! eof ) { print scalar <>; } print "=========SEPARATOR: Processing $input_file =========\n"; }