in reply to Discovering Loaded Modules

You know the modules from %INC. It seems you want to know the packages in use. That can be done by visiting the symbol table tree.
use strict; use warnings; sub visit { my ($parent, $table) = @_; for (keys(%$table)) { if (my ($trimmed) = /^(.*)::\z/s) { next if $_ eq 'main::'; print("$parent$trimmed\n"); visit("$parent$_", $table->{$_}); } } } visit('', \%::);

The presence of &new, @ISA or &DESTROY would be a good indicator that the package is a class.