Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Perl module to find os type, version !!!

Posted on 2011-02-16
1
590 Views
Last Modified: 2012-05-11
I know that $^O and $Config{$OSNAME) will give the name of the OS (MSWin32 or Linux), but it is not a complete name. I am looking for a single perl module which can display the complete details like for example:

Windows NT 2000
Windows Server 2008 R2
Windows XP SP2
Mac OSX 10.5
Ubuntu 10.10

Is there is a perl module which can give the complete details like above and simply MSWin32 or Linux, which is what $^O variable outputs?
0
Comment
Question by:imperialguy
1 Comment
 
LVL 26

Accepted Solution

by:
wilcoxon earned 500 total points
ID: 34911619
The closest module I can find to what you want is Sys::Info::OS but it looks like it is a work-in-progress (the note on CPAN says it currently only supports Windows and Linux).  You could try extending the module yourself.

Otherwise, I think you'll have to write some code specific to each OS (there appear to be quite a few OS-specific modules but they probably have different APIs for getting info).
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
perl script to count sepecial characters in a file 7 147
remove duplicates from the csv file 13 115
git fat pull happens nothing in centos 6.3 python 2.6.6 33 219
Perl Untar File 1 54
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question