I have the following array:
1 2 3
4 5 6
7 8 9
Is there a way to assign individual values of each array element (1 2 3
4 5 6 7 8 9) to seperate variables so that
$var1 = 1
$var2 = 2
.
.
.
$var9 = 9
Dean Paulson
On Wed, Aug 29, 2001 at 02:22:16PM -0500, Dean W. Paulson wrote:
I have the following array:
1 2 3
4 5 6
7 8 9
That looks more like a matrix. What does your array really look like?
@array = (
'1 2 3',
'4 5 6',
'7 8 9',
);
OR
@array = (
[1 2
I have solved my ealier question.
Thanks to those who responded.
the problem was:
I have an input file which contains n rows with 3 items in each row:
1 2 3
a b c
4 5 6
The script output needs to take the items from each row and print them
as:
v1=1, v2=2, v3=3
v1=a, v2=b, v3=c
v1=4, v2=5, v3=6
I have solved my earlier question.
Thanks to those who responded.
the problem was:
I have an input file which contains n rows with 3 items in each row:
1 2 3
a b c
4 5 6
The script output needs to take the items from each row and print them
as:
v1=1, v2=2, v3=3
v1=a, v2=b, v3=c