in reply to How to keep a script from bombing due to a missing module?
#!/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.
|
|---|