Mercio has asked for the wisdom of the Perl Monks concerning the following question:
This is not what I actually want the script to be (I don't want it to print, for ex), but I am just tryint to test it. I keep getting Can't use an undefined value as an ARRAY reference at Counter.pm line 53. from the command prompt when I try to run it. Any help would be great, thanks.sub new { my $package = shift; my @fileArray = 'counter.pl'; if (@_) { my $fileArrayR = $_[0]; @fileArray = @$fileArrayR; } test(\@fileArray); totalBandwith(\@fileArray); return bless({}, $package); } sub test { my $self = shift; my $test = $_[0]; # <-- Line 53 my @tests = @$test; foreach my $line (@_) { print $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Module Help
by shemp (Deacon) on Jun 24, 2004 at 19:58 UTC | |
|
Re: Module Help
by pbeckingham (Parson) on Jun 24, 2004 at 19:52 UTC | |
|
Re: Module Help
by Mercio (Scribe) on Jun 24, 2004 at 20:08 UTC |