in reply to Re^2: displaying 10 results per page
in thread displaying 10 results per page
002: my $page = 1;
and
007: my $start = ($page - 1) * 10;
#!/usr/bin/perl use 5.014; # 972560 my $page = 1; my $start = ($page - 1) * 10; # please recite the rules on # evaluation order and the zero-times +table my $end = $start + 10; say "\$start: $start; \$end: $end";
Output:
$start: 0; $end: 10
|
|---|