The flowers we smell may be getting a whiff of us at the same time. No one knows if roses take time in life to stop and smell the humans, but some plants take action when they smell insect pests.

A study at Penn State found that when tall goldenrod plants sense the sex attractant released by male fruit flies, they produce their own chemical defenses. Those defenses make the plants less appealing to female fruit flies looking for a place to lay their eggs. Females puncture the plants and lay their eggs inside the stems. The attack isn't deadly, but plants serving as fruit fly nurseries tend to produce fewer and smaller seeds.

However, when goldenrod plants in the wild had been exposed to male fruit fly's amorous odor, the plants tended to harbor fewer egg-laying sites. What's more the plants also became more resistant to attacks by other insects.

The exact physiological means by which the plants smell the flies is still a mystery.

"Our understanding of plant olfaction in general remains quite limited," said Mark Mescher, an entomologist at Penn State, in a press release.

"It's become increasingly clear in recent years that plants are responsive to odors," said Mescher. "But previous examples of this are all plant-to-plant. For example, some plants have been shown to respond to the odor of insect-damaged neighbors by priming their own defenses. What's new about this is that it seems that plants may sometimes be able to smell the insects themselves."

The study was published in the Proceedings of the National Academy of Sciences.