Leo Perutz was not initially required for service in the Austrian Army: despite his earlier military service (where he rose to the rank of corporal) his eyesight was deemed too poor. However, Austria’s need for troops overcame that little problem: he was called to another medical inspection on 16 August 1915. He was declared fit for service on 19 September, and on there 8 October joined his regiment at Szolnok, on the Great Hungarian Plain, about 100 km south-east of Budapest. Exactly a month later, on 8 November 1915, he received the first copy of his first novel, Die Dritten Kugel.
On 28 December 1915, Perutz was sent for officer training in Budapest, to his delight; two days later he sent off his second novel Das Mangobaumwunder (which he wrote with Paul Frank) to the publisher. He finished his training in March, and was sent off to the Russian front, where he came down with fever: he sent back the corrected proofs of Das Mangobaumwunder to Munich from the field hospital.
His battalion engaged with the Russians from the middle of June 1916. On 4 or 5 July he was shot in the chest; he had an operation to remove a bullet from near the lung. On 14 July he was moved to another hospital, “frightened and breathless”, and on 18 July he underwent a second operation (Müller 105). His recovery was slow. It was the middle of September before he was reckoned to be well enough to be transported from Hungary back to hospital in Vienna.
While in hospital he was promoted to lieutenant. But for the rest of the war he remained felddienstuntauglich, “unfit for active duty”, and he undertook clerical jobs only. In the latter part of the war he worked as a censor for prisoner-of-war correspondence.
My information comes from Hans-Harald Müller, Leo Perutz: Biographie (Vienna: Paul Zsolnay, 2007).