in reply to File name search with regex

You are deriving $filename from $File::Find::name.

From the docs,
$File::Find::name is the complete pathname to the file.

So , it includes the directory path, which presumably does not start with "L", and will never match /^L/.

Use $_ inside the wanted function, to get just the file name.

        Our business is run on trust. We trust you will pay in advance.

Replies are listed 'Best First'.
Re^2: File name search with regex
by oldenuf2no (Initiate) on Dec 08, 2015 at 15:27 UTC
    Thank you NetWallah. I was looking for what was wrong and you pointed that out. I am new to using perl and using regex. I changed the regex to /Log.txt/ and all was well. I appreciate the other ideas from yourself and the others of how else to try to accomplish what I was doing. I will look in to them as there is always time later for improvements, but for now I am able to carry on with what I have. Thank you very much for the help. -Joleen