First draw a line AB equal to the given perimeter z. First bisect it at point O, the bisect AO at D and OB at E.

 

On the bisector of line AB, mark a length OP equal to OD.

 

From points P and E draw two arcs equal to same length as OD, to intersect at point M.

 

Join PM and ME.

 

OPME will be the required Square

                                                     ****