Watch your quotes. I see you have '$addr' somewhere. The single quotes prevent $addr from being interpreted. You don't need to use quotes at all to use the contents of a variable. You can just say
if you want the value of the variable to be used. As far as the filenames instead of the files, well, you may have to read the contents of the files; I don't know about the API of Mail::Sender.