in reply to Printing to file

I think your file name interpolation has a slight problem, in addition to the one mentioned by a previous responder.

Try replacing the file name with:

weekly_${store}_pdf.sas
so Perl does not try to interpolate the non-existent $store_pdf variable.

You probably want to add use strict; at the top to catch this type of error.

Phil