APM: Variable to determine OS

Evan Harris eharris at puremagic.com
Thu Jul 18 18:13:00 CDT 2002


use Config;

if ($Config{'osname'} =~ /^mswin/i) {
    ...
}
etc.

Evan

-- 
| Evan Harris - Consultant, Harris Enterprises - eharris at puremagic.com
|
| Custom Solutions for your Software, Networking, and Telephony Needs

On Thu, 18 Jul 2002, David Bluestein II wrote:

> Okay, I know I've seen it, but can't remember it. What is the way to
> determine what OS Perl is running on? In particular, I want the script to
> determine if it is running on Windows or LInux, and do a different action
> depending on OS, but I can't remember the trick here.
>
> David
>
> ----------
> David H. Bluestein II                         President & Lead Developer
> dbii at mudpuddle.com                         ii, inc.
>
> http://www.interaction.net
> -        Specializing in Designing Interactive Websites        -
> -              and Searchable Internet Databases                   -
>
>
>
>
>
> _______________________________________________
> Austin mailing list
> Austin at mail.pm.org
> http://mail.pm.org/mailman/listinfo/austin
>




More information about the Austin mailing list