in reply to Reading from file, not to memory

You may be getting into swap by reading the whole file into an array. A while loop on the filehandle will read one line at a time into $_, keeping memory requirements to a minimum.

open my $fh, '<', '/path/to/file' or die $!; while (<$fh>) { if ( $_ eq $external_info ) { print 'great!', $/; last; } } close $fh or die $!;
You will need to chomp at the top of the while loop if $external_info does not have a newline at the end.

I converted to 3-arg open, and used a lexical file handle for that. You can convert back to suit previous versions of perl.

After Compline,
Zaxo