use strict; use Win32::API; my $FREQ_INFO = pack("L4",0,0,0,0); my $CpuSpeed ||= new Win32::API ("cpuinf32", "cpuspeed", ["I"], "P") or die "Could not load DLL\n"; $FREQ_INFO = $CpuSpeed->Call(0); my ($in_cycles, $ex_ticks, $raw_freq, $norm_freq) = unpack("L4",$FREQ_INFO); print "In cycles: $in_cycles\n"; print "Ex ticks: $ex_ticks\n"; print "Raw freq: $raw_freq\n"; print "Norm freq: $norm_freq\n";