in reply to Complex if/else or case logic

As always TIMTOWTDI... It really depends on how complex your logic will get. I'd say if-elsif-else's are fine for relatively simple logic, where your definition of "simple" will vary based on what you consider readable and maintainable.

If you find yourself repeating conditions in your if()'s, factor them out. (e.g. my $is_sender_x = $sender=~/.../; if ($is_sender_x) {...} ...)

The same goes for the bodies of the conditions, if those repeat themselves, factor them out into subs. In your case simple returns are fine, as long as you don't make any typos ;-) (consider using constants).

If you find the branches of the if-elsif-else's to be repeating themselves, or things are just getting too complicated, consider a truth table type approach, like this one: Case Exhaustion Tree