Pupil may mean either a student or part of the eye. An anonymous student of the College of Surgeons, on looking up the word in his dictionary, found that the two words seem to be related, somehow. What's the connection, he asks.
Well, to the old Romans the word pupa was a little girl or a doll. Now, no doubt you have, by now, dear doctor-in-the-making, looked into somebody's eyes in a moment of romantic bliss and seen there a miniature reflection of yourself. The Romans, being rather fond of these longing, lingering gazes, as Catullus and Dean Martin testify, called the opening in the iris in which this image is seen, pupillus; the beholder sees himself in his darling's eyes as her little doll, you understand. So far so good?
Now a little girl who happened to be orphaned and in the care of others was also called a pupilla; a boy in this position was called a pupillus. In Middle French and in Middle English, one word, pupille, served both sexes. When the word first reached England in the 14th century it had the old Roman meaning of an orphaned child looked after by others, a ward in other words. Two centuries later the meaning had changed somewhat; a pupil was now a child looked after by a school or a private schoolmaster. Thus our two English pupils, with two different meanings, have the Latin pupa, girl, doll, as their ultimate origin.
The words megrim, as used by Joyce in Ulysses, is bothering Joan O'Brien from Sandycove: "It was an ancient and a sad matron of a sedate look and christian walking, in habit dun beseeming her megrims and wringled visage."
Megrim is a variant of migrane, itself from late Latin hemicrania, from Greek hemikrania, a pain on one side of the kranion, skull. French physicians in the Middle Ages somehow made migraigne and migraine of this, extending its meaning to bad humour and spite. The word is in English since 1400. An early 15th-century document shows it then meant a bad headache: "a feruent mygreyn was in the rygt syde of hurre hedde." But, as happened in France, extended meanings developed. In Scots, megrim came to mean an earache; Bacon, in 1626, referred to "megrim or vertigo"; later, both in England and over here, having the megrims meant having the vapours. That latter condition, I think, was the one afflicting Joyce's old woman.