in reply to loading a perl module based on the os on which script is running

Just check what OS you're running through the $^O variable (see. perlvar) e.g
BEGIN { require autouse; autouse->import( $^O =~ /^win32/i ? "Module::WinNT" : "Module::Unix" ); }
Also see the recent using 'use' conditionally.
HTH

_________
broquaint

  • Comment on Re: loading a perl module based on the os on which script is running
  • Download Code