No, perpetual machines are not possible by laws of physics. Our universe is shaped in such a way that it can exist out of nothing. It loses nor makes more energy than there already is.
But if one was able to disintegrate a sugarcube into pure energy, it could lit the world for 7 seconds:
4,17 gram of sugare = 0.00417(kg) * (3*10^8)^2 = 9*10^13 Joules (e=mc^2)
World energy consumption is (added up) 13 terawatt and a bit, is 13*10^12 watt.
Striping away all the zeroes (1 joule = 1watt/1sec), we are left with 90/13 = ~7 seconds.
So if you were able to convert matter into pure energy, no energy loss (or maybe a tiny fraction for continuing the conversion progress), you practically invented a perpetual machine. Yet nothing stays forever as it is. In the long run, even this matter-to-energy device will subject to decay. Theoretically and practically this is the closest approach to a perpetual device, I think.