Use -old option to IRAF cl to get desired behaviour in dophot.pl.