BEGIN { if ($^O eq 'Win32') { require Win32::Foo; import Win32::Foo; } elsif ($^O eq 'Linux') { require Linux::Foo; import Linux::Foo; } }
In reply to Re: Portability question: Is there something like '#ifdef' in Perl?
by Elian
in thread Portability question: Is there something like '#ifdef' in Perl?
by sureshr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |