in reply to Scripts with only sub-routines?
use Module; loads that module, and calls the sub import in that module. You can do things there. (This happens at compile time.
When you have a sub called BEGIN, INIT, CHECK or END it is automatically invoced, either at compile time, after the program has terminated (or more obscure times. See perlsub for more details).
If you're new to perl (which is not spelled PERL btw.) it might be that you don't recognize a sub call even though there is one. In many cases just the name of the sub without any parenthesis is enough to call it.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Scripts with only sub-routines?
by kehansen (Novice) on Mar 24, 2008 at 21:10 UTC |