in reply to Re^3: Mini-rant about 'strict'
in thread Mini-rant about 'strict'

You can return from it. Modifications to @_ inside a BEGIN block disappear after leaving the BEGIN block. Also, (caller(0))[3] returns "main::BEGIN" inside BEGIN blocks.

# Prints nothing BEGIN { @_ = 1 } print @_; # Prints 1 BEGIN { print 1; return; print 2; } # Prints main::BEGIN BEGIN { print +(caller(0))[3] } # (Un)expectedly, this won't recurse BEGIN { &BEGIN }
I'd say it behaves quite a bit like a subroutine, albeit not completely.

ihb

Read argumentation in its context!