Hi everyone thank you so much for your help....
Thanks for the tutorials... I'm trying to correct my code ...
I've successfully tried sharing array X (when X is a one_dim array)... but I'm still having the hardest time converting this code so that array X is looks like below


X[0] = ("QWE", "RTYU" ,"IOP")
X[1] = ("QSWE", "TYU" ,"IKOP", "BVC")
X[2] = ("QE", "TYU")
X[3] = ("QSWE", "TYU" ,"IKOP", "BVC", "LMNB")
.
.
.

here is the code that works for one_dim array X

my @X : shared = ();


sub abc {
my $Var2;
.... Here the string in $Var2 gets updated everytime abc is called ....
push(@X, $Var2);
}


here is how I'm changing this

my @X : shared = ();

sub abc {
my $Var2;
.... Here the string in $Var2 gets updated everytime abc is called
push(@{X[$i]}, $Var2);
}

I'm still confused, I'm not quite sure how to share the arrays inside of X correctly.
Could you please help me with that?I greatly appreciate all your help.

thank you so much


In reply to Re^4: sharing array of arrays between threads by bebe
in thread sharing array of arrays between threads by bebe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.