my $contents; open(my $fh, '<', 'control_report_file') or die "cannot open file control_report_file $!"; { local $/; $contents = <$fh>; } close($fh);