in reply to uninitialized value in concatenation (.)

Make sure that your regex is actually matching and putting something into $newfilename. The error is pretty descriptive.

Try printing out $filename inside your sub to make sure that it has what you expect in it.
  • Comment on Re: uninitialized value in concatenation (.)