in reply to Checking and installing a perl module

And another way. Where mod_list contains a list of modules to check for.
#!/bin/bash export FTP_PASSIVE=1 cat mod_list | while read module do perl -M$module -e exit 2> /dev/null || { echo "Missing $module" perl -MCPAN -e "install $module" } done