package Counter; # Counter.pm # count number of digits in specified range use strict; use warnings; use base 'Exporter'; our @EXPORT = qw(count); # make function name available automatically sub count { # arguments are first and last numbers in range my ($start, $end) = @_; my $number; for ($start..$end) { $number++; } return print "Number is $number\n"; } 1; # Modules must return 1 as the last value # End Counter.pm