Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Perl: How to Put one array into another array as an element

Perl: How to Put one array into another array as an element
{filelink=14086}

#!/usr/bin/perl -w
my @tab1 = (1, 2, 3, 4);       # define an array of 4 elements
my @tab2;                     # define an empty array
@tab2 = (@tab1, 5, 6, 70, 8); # Concatenate the<span id="more-45"></span> two arrays
# Show the arrays values
print "@tab1
";
print "@tab2";

Users who found this page were searching for:

  • perl returning arrays

No comments yet.

Leave a Comment