in reply to Re: Printing to file
in thread Printing to file

I tried using both ($store) and ${store} but they both seem to give me the same error. Error : "Cannot open weekly_"24","25"_pdf.sas to read from"

Replies are listed 'Best First'.
Re^3: Printing to file
by runrig (Abbot) on Jul 12, 2006 at 17:53 UTC
    On to the next error :-)

    qw() creates an array, from items separated by whitespace. Quotes and commas in qw() are usually a mistake. You want:

    my @all_stores = qw(24 25);
    Or if, e.g., you wanted more stores (e.g. 10 to 99):
    my @all_stores = (10..99); # or even ("10".."99")
Re^3: Printing to file
by duckyd (Hermit) on Jul 12, 2006 at 17:54 UTC
    That's due to how you're setting up your @all_stores array. You're mixing up the qw and standard array syntaxes. You need either:
    @all_stores = ("24", "25");
    *or*
    @all_stores = qw(24 25);
Re^3: Printing to file
by Yunus (Novice) on Jul 14, 2006 at 01:28 UTC

    Try put use strict;
    @all_stores = qw("24", "25"); will produce error. Try my @all_stores = qw(24 25); instead

    "The giving hands is better than the one accepting" - Muslim's cleric