From 0f4e5e360aa0f61856d1bc0749c8dbb9ff4e5297 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 12 Jul 2012 16:57:11 -0700 Subject: [PATCH] use slurp and io file to read the original report --- scripts/process | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/process b/scripts/process index 05ade0a..40bc1fc 100755 --- a/scripts/process +++ b/scripts/process @@ -440,8 +440,12 @@ if ($codeletter eq 'D' || $codeletter eq 'F') writebug($ref, $data); my $hash = get_hashname($ref); - open(O,"db-h/$hash/$ref.report") || die "read original report: $!"; - my $orig_report= join('',); close(O); + my $orig_report_fh = IO::File->new("db-h/$hash/$ref.report") or + die "Unable to read original report: $!"; + my $orig_report; + { local $/; $orig_report = <$orig_report_fh>;} + close($orig_report_fh) or + die "Unable to close original report filehandle: $!"; if ($codeletter eq 'F') { &htmllog("Reply","sent",$replyto,"You have marked $gBug as forwarded."); &sendmessage(create_mime_message( -- 2.39.2