R
Raghavendra Mahuli
Hi all,
I have a simple question in perl... I have an array -
@a = (10,20,30,40);
Since '$' gives the scalar of a array , i expect "print $a" to give the no.
of elements in the array...
But it dosent work.. However if i copy it to a scalar and then print it, it
works.. Can u pls explain why it is so?
Here is the program listing:
@a = (10,20,30,40);
$x= @a;
print $a;
print $x;
thanx in advance,
regards,
raghu
I have a simple question in perl... I have an array -
@a = (10,20,30,40);
Since '$' gives the scalar of a array , i expect "print $a" to give the no.
of elements in the array...
But it dosent work.. However if i copy it to a scalar and then print it, it
works.. Can u pls explain why it is so?
Here is the program listing:
@a = (10,20,30,40);
$x= @a;
print $a;
print $x;
thanx in advance,
regards,
raghu