Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm partial to INIT blocks myself Noooooooooooo! Please please please don't do that! It will break if you put the code using the INIT block in a module and that modules is directly or indirectly required (i.e., loaded after program compile-time). INITs are not executed right after the file in which it was found is done compiling. It's executed after the program file is done compiling. INIT is used when you need to Personally I go with adding a BEGIN before the bare block, thus avoiding to retype the variable name.
Update: added clarification. ihb
See perltoc if you don't know which perldoc to read! In reply to Re^3: Making a variable in a sub retain its value between calls
by ihb
|
|