package CST2; use strict; use warnings; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(ArrayCount); sub ArrayCount(\@) { (my $array_Ref, undef) = @_; my $ct; foreach my $element (@{$array_Ref}) { $ct++ } $ct; } 1; #### #!/usr/bin/perl use strict; use warnings; use Test::More; #BEGIN:{ use_ok('CST2'); } use CST2; my @patternList = qw(one two three); my $count = ArrayCount(@patternList); print "$count\n";