title: How can I check if a Perl module is installed on my system from the command line?
body: <p>I tried to check if XML::Simple is installed in my system or not.</p>
  
  <pre><code>perl -e 'while (&lt;@INC&gt;) { while (&lt;$_/*.pm&gt;) { print "$_\n"; } }'
  </code></pre>
  
  <p>The above one-liner was used for listing all modules installed in my system. However, it is not listing XML modules.</p>
  
  <p>However, the following executes fine.</p>
  
  <pre><code>perl -e "use XML::Simple "
  </code></pre>
  
  <p>What might be the issue?</p>