Err... I don't think it works, does it? Because in the case where the elsif returns false, the block in the else won't execute. But perhaps I've not understood what it's meant to do... if you have the chance I'd be interested to know what conditions it's meant to check for, and also that I'm right in thinking foo_1, foo_2 and bar are subroutines.