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
or Path::Tiny... use File::Spec; ... sub check_file{ -f && push ... , File::Spec->canonpath($File::Find::name); }
More so, with -w on your shebag line, no warning as used wouldn't work. You probably want to use warnings; instead.... use Path::Tiny; ... sub check_file{ -f && push ... , path($File::Find::name)->canonpath}); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: File::Find duplicate question
by Anonymous Monk on Oct 25, 2014 at 13:19 UTC | |
by 2teez (Vicar) on Oct 25, 2014 at 17:30 UTC |