in reply to solving modulo trouble

Look at perldoc perlop. Binary "/" divides two numbers.