http://qs1969.pair.com?node_id=133846


in reply to Sub prototypes...

Think about the order of execution when you have a subroutine executing as an argument to another subroutine. If you have a sub that is expecting an array as argument, and instead you give it a sub that returns an array, like this:

sub1(sub2()); sub sub1 { my @array = @_; ... } sub sub2 { ... return @arr; }
In what order do you expect them to be executed? I think this is what is happening here, the catch is being executed first since it is an argument to try.

-- Brett

Go not to the Elves for counsel, for they will say both no and yes