I have a module as follows:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
package Test;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw(print_name print_test);
sub print_test() {
   print "test\n";
}
sub print_name() {
   my $file = shift;

   print "$file\n";
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
When I tried to run the following:

use Test;
print_test();

It worked as expected.  But when I tried to run this:

use Test;
file = shift;
print_name($file);

PERL complained "Too many arguments for Fred::print_name ..."

The difference seems to be the presence or absence of an argument.  Can anyone help me 
to get around this problem?

Thanks in advance for your help!

Reply via email to