On Thu, Sep 25, 2003 at 09:12:48PM -0400, Dan Anderson wrote: > If I create code with: > > BEGIN > { > # something > BEGIN > { > # something else > } > } > > Will the inner BEGIN block take precedence over the outer one, and thus > load any subroutines or whatever is in the inner begin block?
BEGIN blocks do not take precedence over one another--they are all still executed. They are, however, executed immediately after perl finishes compiling them. So, if you have the following code: { print "1\n"; BEGIN { print "2\n"; BEGIN { print "3\n"; } } print "4\n"; } The output will be: 3 2 1 4 --Dks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]