in reply to writing subroutines, differences in method of writing

As was recently explained to me in a similar node, use module; statements are enclosed within an implicit BEGIN { } block.

With regard to your second question, there is no difference between the relative placement of the use statement as it is implicitly located within a BEGIN { } block, rendering the two codes identical.

The answer to your third question can be found in perlfunc under use, but suffice it to say the list corresponds to the module's exports, thus allowing selective importation of the module.

Replies are listed 'Best First'.
Re^2: writing subroutines, differences in method of writing
by etm117 (Pilgrim) on May 05, 2005 at 10:56 UTC
    In follow-up to that. I'd recommend keeping any use and require statements at the top of the script. It allows the next guy who needs to maintain your script an easy view of which modules it is using all in one group instead of having to search on the use and require commands to find them dispersed throughout the different subroutines.