in reply to Missing array values after sub routine?

I believe the problem lies in:
@filesToDisplay = @_[0];
As all you are passing to @filesToDisplay is the first element in @_ which is just a flattened list of passed parameter @files. What you are probably looking for is:
my @filestoDisplay = @_;

-enlil