in reply to math mistake?

I think you might be the first person I ever get to help! I just encountered a similar problem to this..

If you want page 2, 3.. to print the FIRST images, then you shouldn't be using -($page * 20). This will give you a negative number, right? If you reverse the keys, you're already using -19 .. -1. You need to use a positive equation. Try

my $top = $page * 19; my $bottom = $top - 19;
It's 3AM, hopefully this works.

"Age is nothing more than an inaccurate number bestowed upon us at birth as just another means for others to judge and classify us"

sulfericacid