my $par = $text{ '$PAR' }; for( my $i = 0; $i < @data; $i += $par ) { print join ' ', @data[ $i .. $i + $par - 1 ]; }