in reply to sub functions return array's

You might want to try declaring @uploads outside the scope of the foreach loop, i.e.
sub getfiles() { opendir DIR,$logSite or die "Unable to open Directory, please try ag +ain"; my @uploads; foreach $pattern (@ARGV) { push (@uploads, grep /$pattern/, readdir(DIR)); } closedir DIR; return \@uploads; }
Using strictures (use warnings; use strict;) would've helped enormously.

A user level that continues to overstate my experience :-))