How can I check if a Perl module is installed on my system from the command line?

前端 未结 10 1152
旧巷少年郎
旧巷少年郎 2020-12-07 14:33

I tried to check if XML::Simple is installed in my system or not.

perl -e \'while (<@INC>) { while (<$_/*.pm>) { print \"$_\\n\"; } }\'
         


        
10条回答
  •  北海茫月
    2020-12-07 15:01

    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)

提交回复
热议问题