in reply to Calling sub's: return true

This isn't addressing your actual issue, but to avoid the whole problem, read up on Exporter. It'll save you a lot of headaches. :-)

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Calling sub's: return true
by BUU (Prior) on Jan 11, 2003 at 00:35 UTC
    Yes, but exporter "pollutes" the original scripts namespace, and you can end up, especially if you use the same set of subs for multiple scripts, getting incredibly confused as to where the sub is if you need to modify or otherwise examine it. Merely using require allows you to be precise as to which sub you want and where it is.
      Using EXPORT_OK with Exporter lets you not only control which subroutines 'pollute' the caller's namespace, it is also self-documenting which subroutines get imported and where they come from when you say:
      use MyFunctions qw(function1 function2 etc);
      Any subs you don't want imported due to namespace collisions you can still call with MyFunctions::function(...)
Re: Calling sub's: return true
by FireBird34 (Pilgrim) on Jan 10, 2003 at 21:22 UTC
    Thanks =) Will look at that. First time actually using a seperate file for sub's, so I knew there was bound to be something ;)