Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Perl module to find os type, version !!!

Posted on 2011-02-16
1
Medium Priority
?
613 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 27

Accepted Solution

by:
wilcoxon earned 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
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

660 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