my @files = (qw/test4.xml test5.xml test6.xml test7.xml/); # assuming you know $inputPathPrefix will be the same for all of them push @inputfiles, @files;