Solved

Perl module to find os type, version !!!

Posted on 2011-02-16
1
610 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
[X]
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
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Six Sigma Control Plans

623 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