I tried to check if XML::Simple is installed in my system or not.
perl -e 'while (<@INC>) { while (<$_/*.pm>) { print "$_\n"; } }'
The above one-liner was used for listing all modules installed in my system. However, it is not listing XML modules.
However, the following executes fine.
perl -e "use XML::Simple "
What might be the issue?
You can check for a module's installation path by:
perldoc -l XML::Simple
The problem with your one-liner is that, it is not recursively traversing directories/sub-directories. Hence, you get only pragmatic module names as output.