Bob, Try: if ($^O eq 'MSWin32') { require 'Net::SMTP.pm'; Net::SMTP->import(); } This is essentialy what 'use Net::SMTP' does, but 'require' is performed at runtime, while 'use' is performed at compile time. John On Thu, May 18, 2000 at 03:38:29PM -0700, Bob Hoffmaster wrote: > Is there an quick/simple/easy way to construct a run-time conditional > "include" statement to use or not use a particular module? > > I want to use the Net:::SMTP module if running on a NT system, else don't > use if on a UNIX system. > > something like this: > > if ($^O eq "MSWin32"){ > use Net::SMTP; > } > > so I can swith to running the script on a UNIX system without commenting out > the 'use Net:::SMPT' line or using a makefile. > > Bob Hoffmaster > ESRI > Manager Backups & Help Desk > [EMAIL PROTECTED] > (909)793-2853 x2532 > (909)307-3037 fax > > > --- > You are currently subscribed to perl-win32-users as: [EMAIL PROTECTED] > To unsubscribe, forward this message to > [EMAIL PROTECTED] > For non-automated Mailing List support, send email to > [EMAIL PROTECTED] > --- You are currently subscribed to perl-win32-users as: [archive@jab.org] To unsubscribe, forward this message to [EMAIL PROTECTED] For non-automated Mailing List support, send email to [EMAIL PROTECTED]