in reply to code for serching .txt file through directories and sub directories

"not working" isn't an error report, please read and understand How do I post a question effectively?. Consider initializing @files outside of your if condition.

  • Comment on Re: code for serching .txt file through directories and sub directories
  • Download Code

Replies are listed 'Best First'.
Re^2: code for serching .txt file through directories and sub directories
by tobyink (Canon) on Jun 12, 2012 at 08:45 UTC

    "Consider initializing @files outside of your if condition".

    Indeed. And pushing to it rather than assigning to it.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'