for(my $i = 1; $i <= length($rest); $i= $i+60){ for(my $j = 60; $i <= length($rest); $j= $j+60){ print substr($rest,$i,$j)."\n"; } }