in reply to Re: Perl script does not work on other directories?
in thread Perl script does not work on other directories?

Why write  traverse( $dir, $string ); if you're using fake globals?

Replies are listed 'Best First'.
Re^3: Perl script does not work on other directories?
by james28909 (Deacon) on Nov 24, 2014 at 17:38 UTC
    the script complained when i tried to declare them only when i needed them. but yes you are correct and i completely missed that. i changed the script on my machine and declared the variables inside their respective subroutine and its working fine. thanks for pointing that out :)

      ... i changed the script on my machine and declared the variables inside their respective subroutine and its working fine....

      Hmm, I don't think I see that reflected in the code you posted, will you do an update?

        sure thing :)