Loading ...
Sorry, an error occurred while loading the content.

How can one determine the OS from with a running script.

Expand Messages
  • Bobby Jafari
    Hi All, How can one determine the OS from with a running script. It tried: Print $OSNAME; It returned an empty string or . Regards, Bobby [Non-text portions
    Message 1 of 5 , Sep 20, 2005
    • 0 Attachment
      Hi All,

      How can one determine the OS from with a running script.
      It tried:

      Print $OSNAME;

      It returned an empty string or "".

      Regards,
      Bobby


      [Non-text portions of this message have been removed]
    • Charles K. Clarkson
      ... use Config; print $Config{osname}; HTH, Charles K. Clarkson -- Mobile Homes Specialist 254 968-8328
      Message 2 of 5 , Sep 20, 2005
      • 0 Attachment
        Bobby Jafari <> wrote:

        : How can one determine the OS from with a running script.
        : It tried:
        :
        : Print $OSNAME;
        :
        : It returned an empty string or "".

        use Config;

        print $Config{osname};


        HTH,

        Charles K. Clarkson
        --
        Mobile Homes Specialist
        254 968-8328
      • Prasanna Goupal
        Hi , Use print OS Name is .$^O. n ; to get OS name under script is running. Thanks. Prasanna Bobby Jafari wrote: Hi All, How
        Message 3 of 5 , Sep 20, 2005
        • 0 Attachment
          Hi ,

          Use

          print "OS Name is ".$^O."\n";

          to get OS name under script is running.

          Thanks.
          Prasanna

          Bobby Jafari <bobby.jafari@...> wrote:
          Hi All,

          How can one determine the OS from with a running script.
          It tried:

          Print $OSNAME;

          It returned an empty string or "".

          Regards,
          Bobby


          [Non-text portions of this message have been removed]



          Unsubscribing info is here: http://help.yahoo.com/help/us/groups/groups-32.html



          ---------------------------------
          YAHOO! GROUPS LINKS


          Visit your group "perl-beginner" on the web.

          To unsubscribe from this group, send an email to:
          perl-beginner-unsubscribe@yahoogroups.com

          Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


          ---------------------------------




          ---------------------------------
          Yahoo! for Good
          Click here to donate to the Hurricane Katrina relief effort.

          [Non-text portions of this message have been removed]
        • jabir ahmed
          hi try print $^O; it should work jabir ... -- It matters not whether you win or lose; what matters is whether I win or lose. Phone: +91 98867 01148 email:
          Message 4 of 5 , Sep 20, 2005
          • 0 Attachment
            hi
            try

            print $^O;

            it should work

            jabir

            On 9/21/05, Bobby Jafari <bobby.jafari@...> wrote:
            >
            > Hi All,
            >
            > How can one determine the OS from with a running script.
            > It tried:
            >
            > Print $OSNAME;
            >
            > It returned an empty string or "".
            >
            > Regards,
            > Bobby
            >
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >
            > Unsubscribing info is here:
            > http://help.yahoo.com/help/us/groups/groups-32.html
            >
            >
            > ------------------------------
            > YAHOO! GROUPS LINKS
            >
            >
            > - Visit your group "perl-beginner<http://groups.yahoo.com/group/perl-beginner>"
            > on the web.
            > - To unsubscribe from this group, send an email to:
            > perl-beginner-unsubscribe@yahoogroups.com<perl-beginner-unsubscribe@yahoogroups.com?subject=Unsubscribe>
            > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
            > Service <http://docs.yahoo.com/info/terms/>.
            >
            >
            > ------------------------------
            >



            --
            It matters not whether you win or lose; what matters is whether I win or
            lose.
            Phone: +91 98867 01148
            email: jabirahmed@... , jabirahmed@...
            Instant Messenger:
            yahoo jabirahmed@...,msn : jabir07@...,ICQ: 56327312, Skype:
            jabirahmed


            [Non-text portions of this message have been removed]
          • Shawn Corey
            ... You have to use the English module to use the English names. See `perldoc English` for details. #!/usr/bin/perl use strict; use warnings; use English;
            Message 5 of 5 , Sep 21, 2005
            • 0 Attachment
              Bobby Jafari wrote:
              > Hi All,
              >
              > How can one determine the OS from with a running script.
              > It tried:
              >
              > Print $OSNAME;
              >
              > It returned an empty string or "".
              >
              > Regards,
              > Bobby

              You have to use the English module to use the English names. See
              `perldoc English` for details.


              #!/usr/bin/perl

              use strict;
              use warnings;

              use English;

              print "$OSNAME\n";

              __END__


              --- Shawn
            Your message has been successfully submitted and would be delivered to recipients shortly.