Hi there again :)
I was wondering why this doesnt work. I have an array of numbers. I use a while loop as follows to split the array.
@array = $_;
@array = split;
This splits the array via new line. Every element of the array holds a string of numbers. The element $array for example might contain the following data.
12 44 111 445
The numbers are separated by tabs.
I now want to get at individual numbers from the element $array. So, I attempted the following.
@line1 = $array;
print "@line1\n"; # this works
@line1 = split(/\t/);
$var1 = $line1;
print "$var1\n"; # this doesnt work
$var1 doesnt print. Could anyone please tell me why and what I could try to rectify this? Thanks