Leaked source code of windows server 2003
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

  1. use OLE;
  2. use Win32;
  3. # Get a favorite class from CIMOM
  4. $context = CreateObject OLE 'WbemScripting.SWbemNamedValueSet';
  5. $context->Add ("J", null);
  6. $context->Add ("fred", 56);
  7. $context->Item("fred")->{Value} = 12;
  8. $v = $context->Item("fred");
  9. print ("$v->{Value}\n");
  10. $context->Add ("Hah", true);
  11. $context->Add ("Whoah", "Freddy the frog");
  12. @a = (122,30,53);
  13. $context->Add ("Bam", \@a);
  14. print ("$context->{bam}->{Value}->[1]\n");
  15. print ("There are $context->{Count} elements in the context\n");