In the perl, how to include a util file ? for example, I have a file “util.pl” , inside which has a function. then I want to include / import that file, how to do it ?
main.pl
use strict;
use warnings;
main();
sub main{
my_funtion("start processing feed");
}
---------
util.pl
use strict;
use warnings;
sub my_funtion {
}
For a pl script you need.
Near the top (after
use strict) of yourmain.plscript.Using
.pmfiles, packages, and theusestatement is probably “better”. But the above will solve the question you asked.