in reply to Efficiency & Maintenance: if/elsif or Other Dispatch Method

madbombX,
It has already been pointed out that the number of conditions you need to account for are small enough that you can use a hash. Notice I didn't say dispatch table. This is because no code need be dispatched.
my $rv = $lookup{$outcome};
In other situations, it is resource prohibitive to store every possible condition ($outcome in your example) in the hash though the number of end states ($rv in your example) is quite manageable. In these situations I like to combine a smart search routine with a dispatch table:
$dispatch->{bin_search($outcome)}->();
In this particular case I have implied a binary search but it could be sequential as you have shown if that scenario fits your data. The point is you abstract finding the item in a list as well as what action to take upon the result.

Cheers - L~R