You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
535 B
29 lines
535 B
use OLE;
|
|
use Win32;
|
|
|
|
# Get a favorite class from CIMOM
|
|
$context = CreateObject OLE 'WbemScripting.SWbemNamedValueSet';
|
|
|
|
$context->Add ("J", null);
|
|
$context->Add ("fred", 56);
|
|
$context->Item("fred")->{Value} = 12;
|
|
$v = $context->Item("fred");
|
|
print ("$v->{Value}\n");
|
|
|
|
$context->Add ("Hah", true);
|
|
$context->Add ("Whoah", "Freddy the frog");
|
|
|
|
@a = (122,30,53);
|
|
|
|
$context->Add ("Bam", \@a);
|
|
print ("$context->{bam}->{Value}->[1]\n");
|
|
|
|
print ("There are $context->{Count} elements in the context\n");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|