in reply to Problem with functions in modules
now the calling file itselfpackage 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;
output:#!/usr/bin/perl use warnings; use strict; use Skywalker; ReadConfig('/tmp/simple.cfg');
Hope this helps. Good luckperl walktest.pl --- going to read config file: /tmp/simple.cfg ---
|
|---|