Welcome to Discuss Everything Forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.


 

Reply to Thread

Post a reply to the thread: how to add array to array in Perl?

Your Message

Click here to log in

In what corner do we have Search box?

 
 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Rate Thread

You may rate this thread from 1-star (Terrible) to 5-stars (Excellent) if you wish to do so.

Topic Review (Newest First)

  • 02-24-2011, 04:48 AM
    winnie w

    how to add array to array in Perl?

    I am trying to use the foreach to loop and add the array together
    i select the query ("English - 1 ; French -2 ; Chines -3)
    select word from words where language = 1;
    and it will return the list of english word. and I want to push this list of word in 1 array
    select word from words where language = 2; - push French to 2 array
    select word from words where language = 3; - Chinese to 3rd array

    and combine those array together
    @main(@array1,@array2,@array3);

    but when I using the for each
    foreach $statement(@$statement)
    {
    my($word) = @$statemnet;
    push (@array1, $word);
    push(@main,@array);
    }
    $wordList = ($id , $main);

    PLease help ..

    Thanks ALL

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •