in reply to Re^2: loading modules using 'use'
in thread loading modules using 'use'

If that's the entire file, there's essentially no difference between those two snippets.

The BEGIN will affect the order in which those statements will be executed in relation to other statements in the file.

Replies are listed 'Best First'.
Re^4: loading modules using 'use'
by angshuman (Novice) on Jul 13, 2010 at 03:15 UTC
    That was just a sample module... Lets assume its got plenty of subroutines written in it, which are also included in the @EXPORT list. Then ???
      With BEGIN, @EXPORT will be initialised before the subs are compiled. Without, after.