http://qs321.pair.com?node_id=37704

Adam has asked for the wisdom of the Perl Monks concerning the following question:

How does Perl detect this loop?
perl -we "sub fail {die 'test' }; END{ fail }; fail()" test at -e line 1. test at -e line 1. END failed--call queue aborted.
As you can see, die seems to get called twice, but then Perl determines that it is in an endless loop and stops. This is desirable behaviour, but I was a little surprised that it works... so I figured I would ask around to find out if this is a 'feature' and not just a fluke.