Hi nisha,
Below is a sample code that calls a ReadConfig() from the module. This should get you started in your work.
package Skywalker;
require Exporter;
@ISA = qw(Exporter);
use strict;
our @EXPORT = qw(ReadConfig);
sub ReadConfig {
my ($file) = shift;
warn " --- going to read config file: $file ---\n";
# more steps here
}
1;
now the calling file itself
#!/usr/bin/perl
use warnings;
use strict;
use Skywalker;
ReadConfig('/tmp/simple.cfg');
output:
perl walktest.pl
--- going to read config file: /tmp/simple.cfg ---
Hope this helps. Good luck