Friday, June 20, 2008

Fetch installed perl package list from commandline

For Redhat Linux there is rpm command with which you can get it by running 'rpm -qa'. And for recent versions we can also use yum. But ever wondered how one can list all perl packages that are installed on a machine, well try the following command.

perl -MExtUtils::Installed -e '$i=ExtUtils::Installed->new();print join "\n",$i->modules();'

Found this in one of perl books. Hope this helps someone who is looking for it.