in reply to Looping over parts of an array
That is exactly what I was thinking of except for the last part where I would have done:
foreach ( @array[ @{$ranges{$page}} ] ) { print $_, "\n"; } [download]