#Package.pm package My::Package; use strict; #can use strict and warnings as usual now as well without any warnings use warnings; use Exporter qw(import); our @EXPORT = qw(print_lines test test_2); #just add in function names as you make them our %EXPORT_TAGS = (all => \@EXPORT); sub print_lines{ my ($input) = shift; while(<$input>){ print; } close($input); } sub test{ my ($input) = shift; print $input; } sub test_2{ my ($input) = shift; print $input; } #### #script.pl use strict; use warnings; use My::Package qw(:all); open (my $file, '<', shift); print_lines($file); test("hello world\n"); test_2("hello this is dog"); # i love this meme lol