in reply to Problems with scoping
I did a "perl -MO=Terse" on the sample code, and it seems that the @files is in scope only within the print statement part. The explanation may be the "if it looks like a subroutine call then it is one" rule. To the parser it looks like the @files is only declared in the print parameter list.