in reply to File::Find duplicate question

..And if I may a second question, how do I output paths with the slash leaning the Windows way?
Instead of doing it yourself, use either "canonpath" from File::Spec

... use File::Spec; ... sub check_file{ -f && push ... , File::Spec->canonpath($File::Find::name); }
or Path::Tiny
... use Path::Tiny; ... sub check_file{ -f && push ... , path($File::Find::name)->canonpath}); }
More so, with -w on your shebag line, no warning as used wouldn't work. You probably want to use warnings; instead.

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Replies are listed 'Best First'.
Re^2: File::Find duplicate question
by Anonymous Monk on Oct 25, 2014 at 13:19 UTC
    Thanks for replying, I didn't know about File::Spec nor Path::Tiny I'm not sure I have access to those modules a work but I'll check it out.

      You may probably have to install Path::Tiny, but you definitely have File::Spec which has been in perl CORE since perl 5.00405, am sure you have better.
      However, need I say you somehow need look at "Path::Tiny".

      If you tell me, I'll forget.
      If you show me, I'll remember.
      if you involve me, I'll understand.
      --- Author unknown to me