perl -MExtUtils::Installed -MModule::Metadata -e '$not=q/_charnames|autouse|blib|charnames|Devel::Peek|encoding|encoding::warnings|feature|File::Spec::VMS|filetest|GDBM_File|if|O|ok|open|Pod::Simple::Debug|sort|Thread|threads/;$not={map{$_=>1}split/\|/,$not};print"#!/usr/bin/perl\n# Load all core Perl modules, pragmas and extensions\n# Exceptions, to prevent errors:\n".(join "\n", map {"#$_"} sort {lc$a cmp lc$b} keys %$not).")\n\n";@_=grep/\.pm/,(ExtUtils::Installed->files("Perl"));for(@_){$m=Module::Metadata->new_from_file($_)->{module} or next;push@m,$m}for(sort{lc$a cmp lc$b}@m){print $not->{$_}?"#":"","use $_;\n"}print"\nprint `ps -v | grep \"\$\$\"`;\n"' > useallcore; perl useallcore