in reply to How to keep a script from bombing due to a missing module?

To do a 'use', you must evall within quotes, as in:
#!/usr/bin/perl BEGIN { eval "use nosuchmodule;"; if ($@) { print "'use' failed\n"; } else { print "'use' ok\n"; } }

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.