in reply to Re^2: how to recognize windows and linux os
in thread how to recognize windows and linux os

Defining Your Needs

If you know that your module simply will not run in a certain environment, you should set up prerequisites. These allow you to provide a level of safety for your users. Prerequisites include:

OSes that your module will not run under

Check $^O and %Config for this. $^O will tell you the name of the operating system. Sometimes, this isn't specific enough, so you can check %Config.

use Config; if ( $Config{ osname } ne 'solaris' || $Config{ osver } < 2.9 ) { die "This module needs Solaris 2.9 or higher to run.\n"; }

Source: http://www.perl.com/lpt/a/2005/04/14/cpan_guidelines.html

Alceu Rodrigues de Freitas Junior
---------------------------------
"You have enemies? Good. That means you've stood up for something, sometime in your life." - Sir Winston Churchill

jdporter fixed markup