in reply to Re: filenames with spaces causing problems
in thread filenames with spaces causing problems

Yeah but I don't always want to do every file or directory. I'd rather be able to pass a list as an argument so the program is more flexable.
  • Comment on Re: Re: filenames with spaces causing problems

Replies are listed 'Best First'.
Re: Re: Re: filenames with spaces causing problems
by broquaint (Abbot) on Jul 11, 2003 at 12:49 UTC
    Then pass in the directory that you're listing, and better still, use that in conjunction with File::Find::Rule e.g
    use File::Find::Rule; my $dir = shift; die "$0: invalid directory $dir\n" unless -d $dir; my @files = find( name => '*.mp3', in => $dir );
    I think you'll find that you'll be able to get a lot more flexibility and extensibility if you build the file listing into the program (not that there's anything wrong with using command line tools of course).
    HTH

    _________
    broquaint