Solved

Perl module to find os type, version !!!

Posted on 2011-02-16
1
565 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now