One edition of the book was used by the Germans in World War II as the key to a book code. Sentences would be made using single words in the book, referred to by page number, line and position in the line. One copy was kept at Rommel's headquarters, and the other was carried by German Abwehr agents infiltrated into Cairo after crossing Egypt by car, guided by Count László Almásy. This code was never used, however, because the radio section of the HQ was captured in a skirmish and hence the Germans suspected that the code was compromised. This use of the book is referred to in Ken Follett's novel The Key to Rebecca – where a (fictional) spy does use it to pass critical information to Rommel.
This use of the novel was also referred to in Michael Ondaatje's novel The English Patient.