hi, the thing is i need to do two things in a parallel. for example i have one @array1 with strings in it and the second one also with some data in it @array2. now i wish to go through data in one @array1, return the string from it and connect it with a string of the same index in the second @array2. Example:
$array1 = [qw(1 2 3 4 5 6 7 8 9 0)]; $array2 = [qw(a s d f g h j k l o)];
meaning i wish to retrive 1 from the @array1 than a from the @array2, print the result and than redo the process so that the end result looks something like this:
1,a 2,s 3,d 4,f 5,g 6,h 7,j 8,k 9,l 0,o
is there a solution with a foreach() function, something like:
froeach my $x (@$array1) { return $x; } foreach my $c (@$array2) { return $c; } print qq($x , $c);
obviously this doesn't work, but if a could some how parallelize the prosea so that it returns one character from the first arrya than the first from the second one than it prints it and repeats the proces for the second characters in the arrays. thank you , Robert

In reply to parallel procesing by baxy77bax

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.