use strict; use warnings; my (@genome_data_g); upstream(\@genome_data_g); foreach $datapoint (@genome_data_g) { print "$datapoint\n"; } sub upstream { my $array_ref = shift; $$array_ref[1] = 'some value'; }
Update: removed & from subroutine call (line 5).
In reply to Re: printing in subroutines
by GotToBTru
in thread printing in subroutines
by ashprog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |