in reply to Re: Modules vs. Libraries
in thread Modules vs. Libraries

You can use the perl variable $^O to learn what system you are on

Unless you are on Windows 95 or 98 .. in which case $^O holds the undefined value. In the Win32 section here at PerlMonks there's some code posted that is a library subroutine to make such things portable to Perl for Win32 running on Win9(5|8). This might not apply to the kind of script the inquirer is running, but as a general principle if a script of widespread usefulness CAN be made to run on Win95, why not do it? I anticipate opposing opinions however.

Intrepid

Q: What is the sound of several hundred Perler-dogs chasing cool code?
A: YAPC - YAPC - YAPC .. ! :)

Replies are listed 'Best First'.
RE: RE: Re: Modules vs. Libraries
by takshaka (Friar) on Jun 28, 2000 at 21:43 UTC
    Eh? I thought $^O worked on Win32 with at least 5.005_3 and up, if not even earlier. It certainly works with 5.6.0.

    Incidentally, I don't see the code you mentioned, but I assume it uses Config.pm (ie, $Config{archname}).

      Eh? I thought $^O worked on Win32 with at least 5.005_3 and up, if not even earlier. It certainly works with 5.6.0.
      Incidentally, I don't see the code you mentioned, but I assume it uses Config.pm (ie, $Config{archname}).
      if ("Win32" ne  "WinNT")  {
       @Win32 = ("Win95","Win98","Win2000","WinNT");
      }
      

      Sorry, the code snippet I refer to is OS.pl, it has just been posted.


      Intrepid

      Q: What is the sound of several hundred Perler-dogs chasing cool code?
      A: YAPC - YAPC - YAPC .. ! :)