in reply to uninitialized value in numeric gt (>) in perl

It's a warning, not an error. And it tells you that either $total or $max_nb is not defined.

Since we can't run the script for you (it depends on files and functions you haven't provided to us), we can only guess why this is the case.