Perl: List Loaded Modules

By Xah Lee. Date: .

Show Loaded Modules

%INC
Predefined variable. A hash of loaded modules.
use Data::Dumper;

print Dumper \%INC;
# prints all loaded modules

__END__

$VAR1 = {
          'warnings/register.pm' => '/usr/share/perl/5.14/warnings/register.pm',
          'bytes.pm' => '/usr/share/perl/5.14/bytes.pm',
          'XSLoader.pm' => '/usr/share/perl/5.14/XSLoader.pm',
          'Carp.pm' => '/usr/share/perl/5.14/Carp.pm',
          'Exporter.pm' => '/usr/share/perl/5.14/Exporter.pm',
          'strict.pm' => '/usr/share/perl/5.14/strict.pm',
          'warnings.pm' => '/usr/share/perl/5.14/warnings.pm',
          'overload.pm' => '/usr/share/perl/5.14/overload.pm',
          'Data/Dumper.pm' => '/usr/lib/perl/5.14/Data/Dumper.pm'
        };

perldoc perlvar

Perl Module