The North American Diplosis resinicola lives in the resin exuded as the results of the attacks of a caterpillar. The larva burrows in the semi-liquid resin, and, according to Osten Sacken,[[368]] is probably amphipneustic. Cecidomyiid larvae are short maggots, narrowed at the two ends, with a very small head, and between this and the first thoracic segment (this bears a stigma), a small supplementary segment; the total number of segments is thirteen, besides the head; there are eight pairs of stigmata on the posterior part of the body. Brauer defines the Cecidomyiid larva thus, "peripneustic, with nine pairs of stigmata, the first on the second segment behind the head; two to nine on fifth to twelfth segments; body as a whole fourteen-segmented without a fully-formed head." The most remarkable peculiarity of Cecidomyiid larvae is that those of many species possess a peculiar organ—called breast-bone, sternal spatula, or anchor-process—projecting from the back of the lower face of the prothoracic segment. The use of so peculiar a structure has been much discussed. According to Giard,[[369]] in addition to the part that protrudes externally, as shown in Fig. 219, A, there is a longer portion concealed, forming a sort of handle, having muscles attached to it. Some of these larvae have the power of executing leaps, and he states that such larvae are provided on the terminal segment with a pair of corneous papillae; bending itself almost into a circle, the larva hooks together the breast-bone and the papillae, and when this connection is broken the spring occurs. This faculty is only possessed by a few species, and it is probable that in other cases the spatula is used as a means for changing the position or as a perforator. Some of the larvae possess false feet on certain of the segments. Williston says they probably do not moult. In the pupal instar (Fig. 219, B), the Cecidomyiid greatly resembles a minute Lepidopterous pupa. The Hessian fly, Cecidomyia destructor, is frequently extremely injurious to crops of cereals, and in some parts of the world commits serious depredation. The larva is lodged at the point where a leaf enwraps the stem; it produces a weakness of the stem, which consequently bends. This Insect and C. tritici (the larva of which attacks the flowers of wheat) pupate in a very curious manner: they form little compact cases like flax-seeds; these have been supposed to be a form of pupa similar to what occurs in the Blow-fly; but there are important distinctions. The larva, when about to undergo its change, exudes a substance from its skin, and this makes the flax-seed; the larval skin itself does not form part of this curious kind of cocoon, for it may be found, as well as the pupa, in the interior of the "flax-seed." Other Cecidomyiids form cocoons of a more ordinary kind; one species, described by Perris as living on Pinus maritima, has the very remarkable faculty of surrounding itself, by some means, with a cocoon of resin. Walsh describes the cocoon-forming process of certain Cecidomyiids as one of exudation and inflation; Williston as somewhat of the nature of crystallisation. Some Cecidomyiids are said to possess, in common with certain other Diptera, the unusual number of five Malpighian tubes; and Giard says that in the larva there is only a pair of these tubes, and that their extremities are united so as to form a single tube, which is twisted into an elegant double loop.

Thirty years or more ago the Russian naturalist, Wagner, made the very remarkable discovery that the larva of a Cecidomyiid produces young; and it has since been found by Meinert and others that this kind of paedogenesis occurs in several species of the genera Miastor and Oligarces. The details are briefly as follows:—A female fly lays a few, very large, eggs, out of each of which comes a larva, that does not go on to the perfect state, but produces in its interior young larvae that, after consuming the interior of the body of the parent larva, escape by making a hole in the skin, and thereafter subsist externally in a natural manner. This larval reproduction may be continued for several generations, through autumn, winter, and spring till the following summer, when a generation of the larvae goes on to pupation and the mature, sexually perfect fly appears. Much discussion has taken place as to the mode of origination of the larvae; Carus and others thought they were produced from the rudimental, or immature ovaries of the parent larva. Meinert, who has made a special study of the subject,[[370]] finds, however, that this is not the case; in the reproducing larva of the autumn there is no ovary at all; in the reproducing larvae of the spring-time rudimentary ovaries or testes, as the case may be, exist; the young are not, however, produced from these, but from germs in close connection with the fat-body. In the larvae that go on to metamorphosis the ovaries continue their natural development. It would thus appear that the fat-body has, like the leaf of a Begonia, under certain circumstances, the power, usually limited to the ovaries, of producing complete and perfect individuals.

Owing to the minute size and excessive fragility of the Gall-midge flies it is extremely difficult to form a collection of them; and as the larvae are also very difficult of preservation, nearly every species must have its life-history worked out as a special study before the name of the species can be ascertained. Notwithstanding the arduous nature of the subject it is, however, a favourite one with entomologists. The number of described and named forms cannot be very far short of 1000, and each year sees some 20 or 30 species added to the list. The number of undescribed forms is doubtless very large. The literature of the subject is extensive and of the most scattered and fragmentary character.

The Cecidomyiidae have but little relation to other Nemocera, and are sometimes called Oligoneura, on account of the reduced number of wing-nervures. Their larvae are of a peculiar type that does not agree with the larvae of the allied families having well-marked heads (and therefore called Eucephala), nor with the acephalous maggots of Eumyiidae.

Fam. 2. Mycetophilidae.These small flies are much less delicate creatures than the Cecidomyiidae, and have more nervures in the wings; they possess ocelli, and frequently have the coxae elongated, and in some cases the legs adorned with complex arrangements of spines: their antennae have not whorls of hair. Although very much neglected there are probably between 700 and 1000 species known; owing to many of their larvae living in fungoid matter the flies are called Fungus-gnats. We have more than 100 species in Britain. Epidapus is remarkable, inasmuch as the female is entirely destitute of wings and halteres, while the male has the halteres developed but the wings of very reduced size. E. scabiei is an excessively minute fly, smaller than a common flea, and its larva is said to be very injurious to stored potatoes. The larvae of Mycetophilidae are usually very elongate, worm-like maggots, but have a distinct, small head; they are peripneustic, having, according to Osten Sacken, nine pairs of spiracles, one pair prothoracic, the others on the first eight abdominal segments. They are usually worm-like, and sometimes seem to consist of twenty segments. Some of them have the faculty of constructing a true cocoon by some sort of spinning process, and a few make earthen cases for the purpose of pupation. The pupae themselves are free, the larval skin having been shed. The Mycetophilidae are by no means completely fungivorous, for many live in decaying vegetable, some even in animal, matter.

Fig. 221—Mycetobia pallipes. Britain. A, Larva; B, pupa; C, imago. (After Dufour.)

The habits of many of the larvae are very peculiar, owing to their spinning or exuding a mucus, that reminds one of snail-slime; they are frequently gregarious, and some of them have likewise, as we shall subsequently mention, migratory habits. Perris has described the very curious manner in which Sciophila unimaculata forms its slimy tracks;[[371]] it stretches its head to one side, fixes the tip of a drop of the viscous matter from its mouth to the surface of the substance over which it is to progress, bends its head under itself so as to affix the matter to the lower face of its own body; then stretches its head to the other side and repeats the operation, thus forming a track on which it glides, or perhaps, as the mucus completely envelops its body, we should rather call it a tunnel through which the maggot slips along. According to the description of Hudson[[372]] the so-called New Zealand Glow-worm is the larva of Boletophila luminosa; it forms webs in dark ravines, along which it glides, giving a considerable amount of light from the peculiarly formed terminal segment of the body. This larva is figured as consisting of about twenty segments. The pupa is provided with a very long, curiously-branched dorsal structure: the fly issuing from the pupa is strongly luminous, though no use can be discovered for the property either in it or in the larva. The larva of the Australian Ceroplatus mastersi is also luminous. Another very exceptional larva is that of Epicypta scatophora; it is of short, thick form, like Cecidomyiid larvae, and has a very remarkable structure of the dorsal parts of the body; by means of this its excrement, which is of a peculiar nature, is spread out and forms a case for enveloping and sheltering the larva. Ultimately the larval case is converted into a cocoon for pupation. This larva is so different from that of other Mycetophilidae, that Perris was at first unable to believe that the fly he reared really came from this unusually formed larva. The larva of Mycetobia pallipes (Fig. 221) offers a still more remarkable phenomenon, inasmuch as it is amphipneustic instead of peripneustic (that is to say, it has a pair of stigmata at the termination of the body and a pair on the first thoracic segment instead of the lateral series of pairs we have described as normal in Mycetophilidae). This larva lives in company with the amphipneustic larva of Rhyphus, a fly of quite another family, and the Mycetobia larva so closely resembles that of the Rhyphus, that it is difficult to distinguish the two. This anomalous larva gives rise, like the exceptional larva of Epicypta, to an ordinary Mycetophilid fly.[[373]]

But the most remarkable of all the Mycetophilid larvae are those of certain species of Sciara, that migrate in columns, called by the Germans, Heerwurm. The larva of Sciara militaris lives under layers of decomposing leaves in forests, and under certain circumstances, migrates, sometimes perhaps in search of a fresh supply of food, though in some cases it is said this cannot be the reason. Millions of the larvae accumulate and form themselves by the aid of their viscous mucus into great strings or ribbons, and then glide along like serpents: these aggregates are said to be sometimes forty to a hundred feet long, five or six inches wide, and an inch in depth. It is said that if the two ends of one of these processions be brought into contact, they become joined, and the monstrous ring may writhe for many hours before it can again disengage itself and assume a columnar form. These processional maggots are met with in Northern Europe and the United States, and there is now an extensive literature about them.[[374]] Though they sometimes consist of almost incredible numbers of individuals, yet it appears that in the Carpathian mountains the assemblages are usually much smaller, being from four to twenty inches long. A species of Sciara is the "Yellow-fever fly" of the Southern United States. It appears that it has several times appeared in unusual numbers and in unwonted localities at the same time as the dreaded disease, with which it is popularly supposed to have some connection.

Fam. 3. Blepharoceridae.[[375]]Wings with no discal cell, but with a secondary set of crease-like lines. The flies composing this small family are very little known, and appear to be obscure Insects with somewhat the appearance of Empidae, though with strongly iridescent wings; they execute aerial dances, after the manner of midges, and are found in Europe (the Pyrenees, Alps and Harz mountains) as well as in North and South America. Their larvae are amongst the most remarkable of Insect forms; indeed, no entomologist recognises them as belonging to a Hexapod Insect when he makes a first acquaintance with them. The larva of Curupira (Fig. 222) lives in rapid streams in Brazil, fixed by its suckers to stones or rocks. It consists only of six or seven divisions, with projecting side-lobes; the usual segmentation not being visible. There are small tracheal gills near the suckers, and peculiar scale-like organs are placed about the edges of the lobes. Müller considers that the first lobe is "cephalothorax," corresponding to head, thorax and first abdominal segment of other larvae, the next four lobes he considers to correspond each to an abdominal segment, and the terminal mass to four segments. He also says that certain minute points existing on the surface, connected with the tracheal system by minute strings, represent nine pairs of spiracles. These larvae and their pupae can apparently live only a short time after being taken out of the highly aërated water in which they exist, but Müller succeeded in rearing several flies from a number of larvae and pupae that he collected, and, believing them to be all one species, he announced that the females exhibited a highly developed dimorphism, some of them being blood-suckers, others honey-suckers. It is however, more probable that these specimens belonged to two or three distinct species or even genera. This point remains to be cleared up. The larva we have figured is called by Müller Paltostoma torrentium. It is certain, however, that the Brazilian Insect does not belong to the genus Paltostoma, and it will no doubt bear the name used by Osten Sacken, viz. Curupira.