Everyone perseverates at one time or another, repeating previous behaviors when they are no longer appropriate. Such perseveration often occurs in situations with working memory demands, and the ability to overcome perseveration has been linked to brain regions critical for working memory. Many theories thus explain perseveration in terms of working memory deficits. However, perseveration also occurs in situations without apparent working memory demands, in which the visible environment specifies appropriate behavior. Such findings appear to challenge working memory accounts of perseveration. To evaluate this challenge, a neural network model of a working memory account of perseveration was tested on tasks with visible solutions. With advances in the mechanisms that support working memory, networks became increasingly able to attend to relevant information in the environment. These developments led to improvements in performance on tasks with visible solutions, paralleling the developmental progression observed in infants. The simulations demonstrate how mechanisms of working memory can subserve perseveration and success on tasks with and without obvious memory demands. In both types of tasks, controlled processing occurs through the activation of task-relevant representations, which provide top-down biasing of other processing pathways. More generally, the simulations demonstrate how common mechanisms can support working memory and attention.