in reply to Calling subroutine in a package from other perl sub.
You can access variables and subroutines in another package simply by prepending the package name.package MyPerl; sub Main_Fn { Second_Pak::ProcessData(); } 1;
Alternatively, you could switch into the other package inside the block:
That can be useful if you want to access a bunch of stuff from the other package.package MyPerl; sub Main_Fn { package Second_Pak; ProcessData(); } 1;
|
---|