in reply to % in perl

The modulus operator gives you the remainder in division. So...
22 % 5 = 2
because 22 divided by 5 is 4 and 2/5 or 4 and a remainder of 2.

Also, you should put code between <code> </code> tags. I suggest you read this.