http://qs321.pair.com?node_id=1012308


in reply to While Loops

Assuming you don't need @data for anything else after the printing:
while (scalar @data) { for (1 .. 100) { formatted_print(shift @data) if scalar @data; } # Do whatever else between runs of 100 } sub formatted_print { my $line_arrayref = shift; # Print the line in whatever format you want }