http://www.perlmonks.org?node_id=623568


in reply to Using only one subroutine from module file

Warm welcome to isha,

# file Test.pm package Test; use strict; use warnings; our (@EXPORT_OK); use base qw(Exporter); @EXPORT_OK = qw(make_file); sub make_file { print qq{Hello from the make_file sub\n}; } sub delete_file { print qq{Hello from the delete_file sub\n}; } 1;
#main.pl #!/usr/bin/perl use Test qw(make_file); make_file();
Example to call only one method from a module.