How to create object in perl?