> This is what I tried: > > eval "use Tk"; > if ($@) { > $notk = 1; > } > > Now, on machines where Tk doesn't exist, it works fine. On machines where Tk > does exist, the program exits silently when I begin to use Tk. > > Perhaps there is a caveat with using this with Tk....any ideas, anyone? > > -Phil > > > eval "use Some::Module"; > > if ($@) { > > # module not found or some other problem > > } > > > > I'm not sure if there are any caveats with this approach WRT the Tk > > module... >
I would have thought in this case you would want the BLOCK form of 'eval' rather than the EXPR form? Or does it matter? Gurus can you expound on the differences in this case? Give: eval { use Tk }; if ($@) { # module not ok, etc. } A try. perldoc -f eval http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]