Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageperl
titleIterate over devices
collapsetrue
foreach $device ( @ParsedDeviceList  )
{
    if ( defined $device->{'host_name'} )
    {
           print $device->{'host_name'} ;
    } else { 
            print "(no hostname)";
    }
    print  ",";
    if ( defined $device->{'serial_number'})
    {
        print $device->{'serial_number'};
    } else {
        print "(no s/n)" ;
    }
    … and so on …
}


Step

...

Three:

...

For

...

each

...

device,

...

get

...

the

...

extra

...

information

...

we’re

...

interested

...

in

Let’s say that we want to know the CPU details – CPU Count, CPU Type, and No of Cores. (Useful for licencing queries)

...