use strict; use warnings; #-- example use Getopt::Long; #-- example / somewhere in your code or imported modules require Math::BigInt; #-- ... more ... #-- at the end, we should have seen them all END { print "VERSION / MODULE / PATH:\n"; for my $module (sort keys %INC) { my $mod_name = $module; $mod_name =~ s{/}{::}; $mod_name =~ s/\.pm$//i; #-- perhaps, the module author followed the convention? my $ver = eval "\$${mod_name}::VERSION" || '?'; printf "%-8s %-35s %s\n", $ver, $mod_name, $INC{$module}; } }