in reply to Not able to execute perl sub routine

Hi Sachin! It is certainly possible to split the "main" package across several .pl files. However I would not recommend that approach. I would put your unzipping sub in a module. You can look at Module Tutorials for a lot of info about making modules.

To get you started, here is something that you can just cut-n-paste your code into.

#!/usr/bin/perl # This is a main program... use strict; use warnings; use ZipUtilDemo; #unzipping imported by default here print "starting main program\n"; unzipping(); #call unzipping sub in module ZipUtilDemo.pm __END__ Prints: starting main program Sub unzipping called!
The module:
#!/usr/bin/perl #This is file: ZipUtilDemo.pm package ZipUtilDemo; use strict; use warnings; use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); use Exporter; our $VERSION=1.00; our @ISA = qw(Exporter); our @EXPORT = qw( unzipping ); our @EXPORT_OK = qw( ); sub unzipping { print "Sub unzipping called!\n"; #of course real code goes here. } 1; #IMPORTANT return a true value!