Rather than read $LARGEFILE once for each line in $REFFILELIST, wouldn't it be more efficient to read it once and check each line against each line of $REFFILELIST?
Something like:
open (FILE, $ReferenceFilePath) or die "Can't open file";
chomp (@REFFILELIST = (<FILE>));
close(FILE);
open OUTFILE, ">$OUTPUTFILE" or die $!;
open (LARGEFILE, $LARGESIZEDFILE) or die "Can't open File";
while (<LARGEFILE>) {
foreach my $line (@REFFILELIST) {
print OUTFILE $_ if (index($_, $line);
}
}
close(LARGEFILE);
close(OUTFILE);
N.B. untested since the original is incomplete and doesn't provide any data.