in reply to Missing array values after sub routine?

In viewThumbnails, change this line:
@filesToDisplay = @_[0];
to
@filesToDisplay= @_;
You were only using the first element of the array passed, which happened to be /pics.

CU
Robartes-