#! /usr/bin/perl # profiler values are in the form: ' __key__: _____value____' (one per line) my $name = `/usr/sbin/system_profiler system_profiler SPHardwareDataType SPSoftwareDataType grep 'Computer Name'`; my $regex = '^\s*Computer Name: (.*)$'; my ( $value) = ( $name =~ /$regex/m ); # print only the first 5 letters print substr $value, 0, 5; # print the same score as the ART print " - score = "; print ord ( substr $value, 0, 1 ) * 256 + ord ( substr $value, 1, 1 ); print "\n"; #sleep for 30 sec to make sure the task only run once on each computer sleep 30;