On Tue, Jul 10, 2007 at 07:02:43PM +0200, Uwe Kleine-König wrote: > my ($recipient) = @_; > - my ($recipient_name) = ($recipient =~ /^(.*?)\s+</); > + my ($recipient_name, $recipient_addr) = ($recipient =~ /^(.*?)(\s+<.*)/); > + > + if ($recipient_name && $recipient_name =~ /[^-a-zA-Z0-9!*+\/ ]/ && $recipient_name !~ /=\?utf-8\?q?.*\?=/) { Why the extra test for truthness of $recipient_name ? > if ($recipient_name && $recipient_name =~ /\./ && $recipient_name !~ /^".*"$/) { > - my ($name, $addr) = ($recipient =~ /^(.*?)(\s+<.*)/); > - $recipient = "\"$name\"$addr"; > + $recipient_name = "\"$recipient_name\""; > + } > + > + if ($recipient_name) { > + return "$recipient_name$recipient_addr"; > + } else { > + return "$recipient"; > } > - return $recipient; Why did you introduce interpolation just to get $recipient again? Then again, why do you need a test at all here? return $recipient_name . $recipient_addr; should work, no? skimo - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html