#!/bin/bash # # Script obtain Perl package version # #modules=(LWP::Protocol::https) modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp) for module in ${modules[@]} do perl -e "eval { require $module; }; if (\$@) { print \"$module: version not found\n\"; } else { print \"$module >= \$$module::VERSION\n\"}" done exit 0