in reply to Re: Re: Finding files in a directory tree from and array of file names
in thread Finding files in a directory tree from and array of file names

Your @sourcefiles array contains $File::Find::name for each of the found files. This is the full pathname of the file.

Later you check these values against the filename in $_. This only contains thea actual name of the file so your match will never work.

strict turns on a number of constraints that will make your Perl scripts better. One of the most useful is that it forces you to think about variable scoping and predeclare variables. This is most often done using my. That's the error that you're seeing.

I didn't really expect you to just add the line without reading the documentation first :-)

Blessed Be
The Pixel

  • Comment on Re: Re: Re: Finding files in a directory tree from and array of file names