in reply to How to make code smaller--saving steps and writing one liners

My ideas:

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Replies are listed 'Best First'.
Re^2: How to make code smaller--saving steps and writing one liners
by Anonymous Monk on May 09, 2009 at 02:23 UTC
    Use local $_=$_; in the "wanted" callback and you can modify it as you like.
    Or just modify it as you like :) File::Find doesn't mind

      You are right, I was too careful here. The written contract (the File::Find documentation) explicitly states:

      The above variables [$File::Find::dir, $File::Find::name, and $_] have all been localized and may be changed without effecting data outside of the wanted function.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)