Mega Code Archive

 
Categories / Perl / Language Basics
 

%, the remainder, or modulo operator

#!/usr/bin/perl use warnings; print"15 divided by 6 is exactly ", 15 / 6, "\n"; print "That's a remainder of ", 15 % 6, "\n";