Hello
I'm a newbie of PERL and have a question about sending parameters to functions. As I understand the parameters are stored in an array so lets say I do as below
my $i="test"
my @tmp=("1","2","3");
writeThis(@tmp,$i);
.
.
.
sub writeThis(){
my @tmplocal=shift;
my $ilocal=shift;
print "My array: ".$tmplocal."\n";
print "My i: ".$ilocal."\n"
}
Would print out :
My array: 1 2 3 test
My i:
How should I do so my "sub function" understands that there are 2 parameters sent?
/D_S
I'm a newbie of PERL and have a question about sending parameters to functions. As I understand the parameters are stored in an array so lets say I do as below
my $i="test"
my @tmp=("1","2","3");
writeThis(@tmp,$i);
.
.
.
sub writeThis(){
my @tmplocal=shift;
my $ilocal=shift;
print "My array: ".$tmplocal."\n";
print "My i: ".$ilocal."\n"
}
Would print out :
My array: 1 2 3 test
My i:
How should I do so my "sub function" understands that there are 2 parameters sent?
/D_S