モジュール内の特定のサブルーチンだけインポートする:
#!/usr/bin/env perl
use v5.12;
use warnings;
use File::Basename qw/ basename /; # リストで指定

my $name = "/usr/local/bin/perl";
say basename $name;
日付の操作はDateTimeモジュールで:
#!/usr/bin/env perl
use v5.12;
use warnings;
use DateTime;

my $now = DateTime->now();

my $y = $ARGV[0];
my $m = $ARGV[1];
my $d = $ARGV[2];

my $user = DateTime->new(year => $y, month => $m, day => $d);

my $duration = $now - $user;

my @units = $duration->in_units( qw(years months days));
printf "%d years, %d months, and %d days", @units;