- my @refs = $refs ? ($refs =~ /<([^>]+)>/g) : ();
- if (my $irt = $hdr->header_raw('In-Reply-To')) {
- # last References should be $irt
- # we will de-dupe later
- push @refs, mid_clean($irt);
+ my @refs = defined $refs ? ($refs =~ /<([^>]+)>/g) : ();
+ my $irt = $hdr->header_raw('In-Reply-To');
+ if (defined $irt) {
+ if ($irt eq '') {
+ $irt = undef;
+ } else {
+ $irt = mid_clean($irt);
+ $irt = undef if $mid eq $irt;
+ }