in reply to Problems printing contents of array

my @s340Strings = qw("abc", "cdef","yxx","zzz"); print "@s340Strings\n"; prints: "abc", "cdef","yxx","zzz"
Check your code. Please check if the array is a array of scalars or array of scalars and references. try hard-coding for test purpose the array value and see if you get past this line. That would mean the data is the culprit.

Hope it helps
Thanks!
Sapna

Replies are listed 'Best First'.
Re^2: Problems printing contents of array
by mrborisguy (Hermit) on Jul 07, 2005 at 16:16 UTC

    That code is correct, but very confusing. You create a two element array, $s340Strings[0] == "\"abc\"," and $s340Strings[1] == "\"cdef\",\"yxx\",\"zzz\"". That may be what you intended, but when I read it, it looks like you intend:

    my @s340Strings = qw(abc cdef yxx zzz); # or my @s340Strings = ("abc","cdef","yxx","zzz");

    Just trying to clarify...

        -Bryan