I tried to check if XML::Simple is installed in my system or not.
perl -e \'while (<@INC>) { while (<$_/*.pm>) { print \"$_\\n\"; } }\' >
perl -e \'while (<@INC>) { while (<$_/*.pm>) { print \"$_\\n\"; } }\'
For example, to check if the DBI module is installed or not, use
perl -e 'use DBI;'
You will see error if not installed. (from http://www.linuxask.com)