Help for this page

Select Code to Download


  1. or download this
       
    use Sys::Info;
    use Sys::Info::Constants qw( :device_cpu );
    ...
    
    printf "CPU freq %s MHz\n", $cpu->speed; #line 22
    printf "%d CPUs\n"  , $cpu->count ;
    
  2. or download this
    # alternative 1
    Global symbol "%options" requires explicit package name at pcData.pl l
    +ine 19.
    ...
    Odd number of elements in hash assignment at /usr/lib/perl5/site_perl/
    +5.14/Sys/Info/Driver/Unknown/Device/CPU/Env.pm line 26.
    Use of uninitialized value $family in hash element at /usr/lib/perl5/s
    +ite_perl/5.14/Sys/Info/Driver/Unknown/Device/CPU/Env.pm line 86.
    Use of uninitialized value in printf at pcData.pl line 22.