in reply to Printing to file

(This continues from where philcrow and runrig left off.)

In

die("Cannot open weekly_${store}_pdf.sas to read from ") unless(open(FINAL, ">weekly_${store}_pdf.sas"));

Fix:

open(my $fh_final, '>', "weekly_${store}_pdf.sas") or die("Unable to open weekly_${store}_pdf.sas for writing: $!\n");

Don't forget to replace the occurences of "FINAL" in the remainder of your code with "$fh_final".

Replies are listed 'Best First'.
Re^2: Printing to file
by Anonymous Monk on Jul 12, 2006 at 17:54 UTC
    Hmm I tried using your fix and the error states: "Unable to open weekly_"24,"25"_pdf.sas for writing : Invalid arguments+". I must be doing something wrong...
      That's an unrelated problem, already answered above.
        OK I got it to work... I removed the qw from the my @all_stores = qw("24","25"); part.... Thanks for everyones help.....