I tried to check if XML::Simple is installed in my system or not.
perl -e \'while (<@INC>) { while (<$_/*.pm>) { print \"$_\\n\"; } }\'
>
If you want to quickly check if a module is installed (at least on Unix systems, with Bash as shell), add this to your .bashrc file:
alias modver="perl -e\"eval qq{use \\\$ARGV[0];\\\\\\\$v=\\\\\\\$\\\${ARGV[0]}::VERSION;};\ print\\\$@?qq{No module found\\n}:\\\$v?qq{Version \\\$v\\n}:qq{Found.\\n};\"\$1"
Then you can:
=> modver XML::Simple
No module found
=> modver DBI
Version 1.607