in reply to My first perl module

Refering to the documentation for the Exporter module, we see that the entries in @EXPORT are exported by default, but the entries in @EXPORT_OK are exported only if the calling package asks for them.

@EXPORT_OK is very useful for limiting namespace pollution. For example, you might have two modules, each of which has a genHeader method. If they both export genHeader by default, only the one imported second will stick. Whereas if they export genHeader on request, you can import the one you know you want and there will be no confusion.

If you have a lot of entries in @EXPORT_OK, you can create a tag to allow someone to import a bunch of methods/variables without having to list them all. See Exporter and perlmodlib for more.