in reply to Re^4: Perl $ENV hash
in thread Perl $ENV hash

You are not using the strict pragma. If you had done so, Perl would have forced you to declare all variables you use. That would have shown you that there is no variable declared with the name $Win32_Environment, but you try to use it in your string.

Replies are listed 'Best First'.
Re^6: Perl $ENV hash
by kingjamesid (Acolyte) on Apr 20, 2010 at 20:25 UTC
    that was a mistake. I removed the '$'. But still didnt work I tried something else
    if ($Wmi) { my $Vars = $Wmi->Get('Win32_Environment'); my $var = $Vars->Spawninstance_ (); #print $var; print $var ->{'CADMAP'}; $var->put_(); #print HLIST $Vars{"pc_os"}; #foreach (keys %Vars) { # print HLIST $Vars{$_} ."\n"; #} }
    Still no luck.