I have to import the functions and variables which is in EXPORT and EXPORT_OK variable.
@EXPORT = qw(&shuffle @card_deck); @EXPORT_OK = qw(&collect @list); our @card_deck = qw(this is for testing); our @list = qw( ass Jack queen king ); sub shuffle { return "shuffle is done\n" } sub distribute{ return "distribute is OK\n" } sub collect{ return "Collection is finished\n" } 1;
if we use the use package it will import the Export variable if we use the use package qw(..) it will import the Export_OK variable I have to import both the variable in one (use) statement.
for example the export is having more then 100 function and export_ok is having couple of function and some variable. How to import both the function and variable.
In reply to Export in perl by aantonyselvam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |