in reply to RE: Strange Behavior while Parsing Sendmail logs
in thread Strange Behavior while Parsing Sendmail logs

$to_addr = ($_ =~ rest of stuff);

That will set $to_addr to either 1 or 0 depending on whether the substitution succeeded or not.

-Matt