Re: Battery info on a laptop

2006-03-05 Thread $Bill Luebkert
John Serink wrote: Use the appropriate WMI classes with the Win32::OLE module. You should be able to find something useful here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/computer_system_hardware_classes.asp ... Power Classes The Power subcategory groups

RE: Battery info on a laptop

2006-03-05 Thread John Serink
Use this as a hack template till you get your head around it: #!perl # Simple Perl Script to illustrate use of WMI to gather system information # and display it in the same format at the Windows Management Console use Win32::OLE qw(in with); use Win32::Registry; # Pick a host that you have the

Re: Need help with variables

2006-03-05 Thread Foo Ji-Haw
If you've defined your $DBH in common.pm, then to access it you have to include the namespace: my $sth = $common::DBH-prepare(..); And in your common.pm, use our instead of my to share the variable: our $DBH = DBI-connect ( DBI:mysql:database=sample; host=127.0.0.1,root, password);

Re: Battery info on a laptop

2006-03-05 Thread $Bill Luebkert
John Serink wrote: Use this as a hack template till you get your head around it: #!perl # Simple Perl Script to illustrate use of WMI to gather system information # and display it in the same format at the Windows Management Console ... You can do a more generic dump of the object like