I want to import a library into my perl script. Below is my attempt:
function.pl
#!/usr/bin/perl
package main;
use strict;
use warnings;
use 5.005;
use Term::ANSIColor qw(:constants);
use LWP::Simple;
use diagnostics;
use File::Spec;
use Getopt::Long;
use File::Basename;
use Cwd 'abs_path';
sub myfunction {
print RED, " Deleting...", RESET;
system("rm –f /file_location/*.");
print "deleted.\n";
}
I want to import function.pl in this new perl script.
#!/usr/bin/perl
package main;
myfunction;
myfunciton2;