Perl Monk, Perl Meditation | |
PerlMonks |
Re^2: Happy unbirthday redux! and other birthday stuffby stevieb (Canon) |
on May 18, 2017 at 15:06 UTC ( [id://1190539]=note: print w/replies, xml ) | Need Help?? |
Nice effort. I would highly recommend using @EXPORT_OK as opposed to @EXPORT. The latter forces the sub names into the caller's namespace. Even though you only have a single sub in most cases, it's still nicer to not pollute a namespace automatically:
Now, you can do:
...or even:
...which will import all @EXPORT_OK listed subs.
In Section
Cool Uses for Perl
|
|