sub printEachExpt { my @expNames = @{$_[0]}; # De-reference the array. my $outputPath = $_[1]; print "The output path is $outputPath.\n"; print "The experiment files are:\n"; print "$outputPath/$_\n" for @expNames; } # And to call it: printEachExpt( \@myExp, $mypath ); # -------------^ the \ means a reference to the @myExp
In reply to RE: RE: Passing different values into subroutines
by Adam
in thread Passing different values into subroutines
by MadraghRua
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |