Application using random
package MyRandomApp;
use strict;
use warnings;
use Exporter qw(import);
our @EXPORT_OK = qw(dice);
sub dice {
my ($n) = @_;
return 1 + int(rand() * $n);
}
1;
use strict;
use warnings;
use 5.010;
use MyRandomApp qw(dice);
say dice(6);
say dice(6);
say dice(6);
perl -Ilib bin/dice.pl