note eyepopslikeamosquito <P> The later edition of <a href="">Effective Perl Programming</a> has item 20, <I>"Use foreach, map and grep as appropriate"</I>, which gives an excellent summary of when to use <C>foreach</C>, <C>map</C> and <C>grep</C>: <ul> <li> Use <C>foreach</C> to iterate read-only over each element of a list <li> Use <C>map</C> to create a list based on the contents of another list <li> Use <C>foreach</C> to modify elements of a list <li> Use <C>grep</C> to select elements in a list </ul> </P> <P> Hall, McAdams and foy further caution against modifying a list via <C>map</C>: <blockquote> "For efficiency, <C>$_</C> is actually an alias for the current element in the iteration. If you modify <C>$_</C> within the transform expression of a <C>map</C>, you modify the input data. This is generally considered to be bad style, and -- who knows? -- you may even wind up confusing yourself this way. If you want to modify the contents of a list, use <C>foreach</C>." </blockquote> </P> <P> I'm pretty sure the earlier edition you are reading has a similar item. If you read this item, you should not be confused about which one to use. I suggest you focus on clarity and only bother benchmarking if performance is really critical. </P> 997326 997326