I'm writing a general utility script with multi functions like the one below. My questions is when I run this on a system that is missing certian modules the script bombs. How can I avoid this behavior? I would like a script to continue doing whatever it can without it exiting. As always Thanks!!
#!/usr/bin/perl use Getopt::Long; GetOptions("tk" => \$tk); if ($tk) { &tk(); } do this do whatever.... blah more blah sub tk { use Tk; use strict; more blah blah and yet more blah }
Edited by Chady -- moved text outside of code tags.
In reply to How to keep a script from bombing due to a missing module? by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |