If it's a perfect square, that means all four sides are equal in length, meaning the dimensions of length and width are the same.
Area=base*height
The only identical numbers that work to get 100 square feet is 10*10
So, all four lengths around the square are 10 feet, so that's 10 feet*4 sides.
You'd need 40 feet of fencing.