I have a hack, I need to use in these conditions:
- This is the last page of data.
- This is not the first page.
- There is no data element with page size and parity.
So, I tried this code:
my $use_hack =
$last_page_number == $current_page_number and
$page_number != 1 and
$total_items % $items_per_page != 0;
And I continue to receive this warning Useless use of numeric ne (!=) in void contextabout the last condition and evaluate true when $total_items % $items_per_page = 0.
say 'NOT EVEN' if $total_items % $items_per_page != 0;
I tried various combinations of parentheses to get it right, but nothing works.
source
share