vyeddula has asked for the wisdom of the Perl Monks concerning the following question:
Case1:No issue
my @array1=(1,2,3); my @array2; @array2=(@array1,4,5,6); print"@array2\n";
This printed 1 2 3 4 5 6 which is expected
Case2:I tried to extend this to qw and reason for my question
my @array1=qw(Jan Feb Mar); my @array2; @array2=qw(@array1 Jan Feb Mar); print"@array2\n";
This printed @array1 Jan Feb Mar
Am i missing any basic thing here. How to stuff array1 contents inside array2 when qw is used?Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: stuffing an array inside a list
by Grimy (Pilgrim) on May 26, 2013 at 01:34 UTC | |
|
Re: stuffing an array inside a list
by NetWallah (Canon) on May 26, 2013 at 01:37 UTC | |
by Grimy (Pilgrim) on May 26, 2013 at 01:42 UTC |