in reply to using pl/pm and require HELP !

You're not requiring the script in the pm where you need the subroutine. You can either call it as main::subroutinefrom_myperlscript() or require "/somepath/myperlscript.pl" at the top of mypack.pm. In either case, you really need to review what you're doing. If you want your module (pm) to be at all portable, build your pm's within a somewhat sane manner. The requiring of a particular sub to exist from within the main namespace (the executing script) is fairly interesting. Of course, anytime the sub doesn't exist their script will break. With adding the require within the module, you are introducing some installation nightmares. Modules are supposed to be fairly easy to install without any (well, at least not a lot of) editing. You could probably make myperlscript.pl into a module that exports the sub you're looking to use. Then you can just use myperlscript; and get the functionality for which you're looking. Some suggested reading: require, use, perlmod, and perlmodstyle.

If you have a sub in myperlscript.pl that must be shared with legacy code, that's all right. Just don't use it anymore. Please do not repeat the mistakes of a previous programmer. If you come along something that isn't correct, note it so you can fix it later. When you're programming, please consider the poor sap coming in behind you. If you are the poor sap, do not make things harder on yourself. You're presently updating this code and in the future you may need to update it again. Just make myperlscript.pl into a module that can export the sub you need.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1