On 1/22/07, Mike Martin <[EMAIL PROTECTED]> wrote:
Is it possible to get a OS independendent listing of Hardware installed?
In particular I want to get a list of following devices
CD/DVD drives
Video devices
At the moment I am using Linux specific devices, but I would like the
capability to use hardware description as used by native OS
Yes and no. There is no standard system interface that returns the
relevant information on in the same format on different systems. There
are, however, CPAN modules that can return device information for most
operating systems (using procfs, sysfs, DeviceTree, etc., and I'm sure
there's somethng under the Win32 module tree, too.). From there it's
pretty simple to write a script that figures out what operating system
it's running on and queries that OS's system interface using the
approprite module. See $^0 in perlvar.
HTH,
-- jay
--------------------------------------------------
This email and attachment(s): [ ] blogable; [ x ] ask first; [ ]
private and confidential
daggerquill [at] gmail [dot] com
http://www.tuaw.com http://www.downloadsquad.com http://www.engatiki.org
values of β will give rise to dom!