in reply to Calculated % of data greater than $x in an array

@array =(1, 4, 5, 7, 8, 9, 10, 20, 30, 40, 60);; $n = 5; printf "%.2f%% of the array is greater than %d\n", grep({ $_ > $n }@array) / @array *100, $n;; 72.73% of the array is greater than 5 $n = 20; printf "%.2f%% of the array is greater than %d\n", grep({ $_ > $n }@array) / @array *100, $n;; 27.27% of the array is greater than 20 $n = 0; printf "%.2f%% of the array is greater than %d\n", grep({ $_ > $n }@array) / @array *100, $n;; 100.00% of the array is greater than 0