use strict; use warnings; use Data::Dumper; sub load_file { my $file = shift; my $text; { local $/; open my $fh, $file or die "Can't open $file $!"; $text = <$fh>; } return $text; } my $text = load_file( '/home/greyfox/data/TBLLOTUSNOTESPYRAMID.txt' );