I tried running the similar code on my script and I get the error message whereby it stated that
SO I change the value here for this part (0 to 3) and I add in the main for loop:can't use string ("0") as an ARRAY ref while "strict refs" in use at l +ine 119. Only hard reference allowed by "strict refs".
for my $dataratio(@full_data){ for my $six ( 3 .. $columns ){ for my $tre ( 3 .. $rows ){ for my $tri ( 3 .. $rows ){ } } }
Ok. i think I am doing something wrong here. So for my( $d_h ) = @_; how do you actually exclude out the first three columns of full_data (e.g. M11, M12..)? Another question is this code:can't use string ("M11") as an ARRAY ref while "strict refs" in use at + line 119. Only hard reference allowed by "strict refs".
I do not understand how this part works. Hope you can nudge me in the right direction?1+$six, 1+$tri, 1+$tre, $tri, $six, $tre, $six, ;;; $ratio[ $six ][ $tri ][ $tre ] = $$d_h[ $tri ][ $six ] + / $$d_h[ $tre ][ $six ] ;
In reply to Re^15: How to store the output from foreach loop into variable/array without printing?
by hellohello1
in thread How to store the output from foreach loop into variable/array without printing?
by hellohello1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |