in reply to loading a perl module based on the os on which script is running
If you look inside File::Spec (shipped with Perl), you will find this code:
package File::Spec; use strict; use vars qw(@ISA $VERSION); $VERSION = 0.82 ; my %module = (MacOS => 'Mac', MSWin32 => 'Win32', os2 => 'OS2', VMS => 'VMS'); my $module = $module{$^O} || 'Unix'; require "File/Spec/$module.pm"; @ISA = ("File::Spec::$module"); 1; __END__
Is this what you need?
Ciao, Valerio
|
|---|