in reply to Odd WMI situation
The in() function has a prototype and that influences how Perl parses the rest.
You could either predeclare the in function so that Perl knows how to parse it:
sub in(@);
... or alternatively, you can tell Perl that in will become a function by explicitly using parentheses at every invocation (which I prefer):
foreach my $item (in($WMI->ExecQuery('Select * from Win32_PhysicalMemo +ry'))) {
Personally, I would try to split up the functionality into two (or three) modules, one Win32-specific module, one POSIX-specific module and one module that loads either the Windows or the other module, depending on the OS.
|
|---|