Why thermostat does not work in a Perl script?

Hello,

i have a question about my script,would you help me please. why thermostat does not work in  the Perl script? i my script i set temperature 300K and want to control it using Nose thermostat,but during running temperature is higher (about 800 or 900 or 1000) or lower( about 100) that 300. Does anyone has any idea?

Thanks

sousa