in reply to What am I doing wrong?
in thread Arrays of files from an array of file names

First, are you sure @files isn't supposed to be ($file1, $file2, $file3)? Right now, you're just setting it to the STRINGS ('file1', 'file2', 'file3').

Anyway, you're missing the semicolon at the end of the do BLOCK expression on line 14. do BLOCK turns a BLOCK (which DOESN'T need a semicolon at the end) into an expression.

And you can get away from that by doing:
open FILE, $_ or warn("...: $!"), next;


japhy -- Perl and Regex Hacker