in reply to Open() : Not reading all lines in my text file

Here is one way to read the hole file at one time.

my $File_Data = get_file_data('/path/to/the/file/to/read'); print $File_Data; sub get_file_data { my $titlefile = shift; open F, "< $titlefile" or die "Couldn't open `$titlefile': $!"; local $/ = undef; # Read entire file at once my $contents = <F>; # Return file as one single `line' close F; return $contents; }
Updated: have to wrap local in a sub.