in reply to main package
What package does it belong to?
The package it is being declared in. You can find that out with
print __PACKAGE__, "\n";
Now , if I use strict, is it required to use main before the $anything ($main::anything) ?
Try it out!
Or does main mean main body (and not subroutines) of program that we are dealing with ?
No. Packages can be only changed with the package declaration. Declaring a subroutine doesn't change the package at all.
|
|---|