in reply to chdir in perl

I think the chdir is working OK (though I agree you should check for success or failure).

Rather -- what is updquery? My guess is that when you run it, it is relying on something from the runtime environment that's not there. If you print the results of the updquery call, as below, perhaps you'll get some feedback from it to help you.

print `updquery -sdate 26-june-2002.02:00:00 -edate 02-july-2002.00:00 +:00 -brtype golden -status closed`;