Hi, Rob, My Perl code has more than 1,000 lines (maybe I shouldn't have used Perl to code this many lines), and that is why I am hesitant to put all the code in the "if ($@)" block. That is a very good way for shorter scripts, though.
Many thanks for your help! Steven -----Original Message----- From: Sisyphus [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 4:56 PM To: Wu, Gang (Steven) Cc: [EMAIL PROTECTED] Subject: Re: How do I disable modules in a script Wu, Gang (Steven) wrote: > Hi, Rob, > > Your initial solution uses "use", and if the C inline module isn't > installed, the program just quits. Then Eric suggested using import, but > I wasn't sure how to put my C code at the end of the file. > It only "just quits" after all of the code in the 'if($@){}' block gets run. So you would simply have it as : if($@) { # Run the code that you want to run # when there's no Inline available exit; } No matter ... I can envisage sutuations where that wouldn't be the best solution ... just wondered if there was some other problem and it seems there isn't :-) Cheers, Rob -- Any emails containing attachments will be deleted from my ISP's mail server before I even get to see them. If you wish to email me an attachment, please provide advance warning so that I can make the necessary arrangements.