in reply to Re: File::Find problems
in thread File::Find problems
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File::Find problems
by eff_i_g (Curate) on Jan 15, 2010 at 20:47 UTC |