ok. i thought the value from the last if expression would be some sort of special variable in the local block. nice to know there's not.
Well, not that nice, but I've never really felt the lack of such a beast. OTOH you can do an aliasing in a syntactically sweet enough way as hinted at the very end of my other reply.
typically more people here yell at me (and others) for writing " return $var " than " $var "
Right! it's a very common and unambiguous perlism. I'm all with you, as you can see in my comment to his reply.