Hi all.

I can't figure out how to change elements of an array after read in data
from rcols with the PERLCOLS option.

Here is basically what I'm doing:

>{$x, $y, @arr_I} = rcols "xxx.dat", 0, 1, {PERLCOLS => [2]}
>{$a, $b, @arr_II} = rcols "yyy.dat", 0, 1, {PERLCOLS => [2]}

Now I'd like to change some elemnts of @arr_I with elements from
@arr_II.

Something like:

for $i (0..10) {

@arr_I[$i] = @arr_II[$i + 10];

}

but it won't work. I thought I understood the basic consept of arrays in
perl, but I obviously have not. I've tried to alter the syntax according
to the litterture ( @arr_I[$i] = @{$arr_II[$i + 10]} ) but things are
not working out the way I want.
Probably a simple solution I'm just not able to see...

Cheers,
Kare


_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to