in reply to Generate a # between 1 and 50 in groups of 5

printf $_ == 5 ? "%2d\n" : "%2d ", int rand(50)+1 for (1..5) x 5;