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

You are almost there. You can use the % operator (modulus) to find each fifth number. If modulus 5 returns 4, output a newline, otherwise, output a space:
#! /usr/bin/perl use strict; use warnings; use List::Util qw{ shuffle }; my @numbers = shuffle(1 .. 50); for my $index (0 .. $#numbers) { # replace wi +th 0 .. 25 to stop after 5 lines. print $numbers[$index], $index % 5 == 4 ? "\n" : ' '; }
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ