Hi
Yes. You can avoid embedding the path separator by using File::Spec. Though for throwaway scripts I don't normally bother.
I find the Functions version more convenient when not doing anything complicated with it:
use strict; use warnings; use 5.010; use File::Spec::Functions qw(catfile rootdir); my $volume_name = catfile(rootdir, 'Volumes', 'Volume name'); say catfile($volume_name, '*');
Hope this helps.
FalseVinylShrub
Disclaimer: Please review and test code, and use at your own risk... If I answer a question, I would like to hear if and how you solved your problem.
In reply to Re^2: File::Find problems
by FalseVinylShrub
in thread File::Find problems
by 7stud
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |