- or download this
my @array = (42,43,44,45);
my $scalar1 = 1;
my $scalar2 = 2;
...
$s2 += 33;
return ($s1, $s2);
}
- or download this
main::my_subroutine() called too early to check prototype at - line 5.
Can't use string ("42") as an ARRAY ref while "strict refs" in use at
+- line 9.
- or download this
sub my_subroutine(\@$$) {
my @a = @{shift()};
my $s1 = shift();
...
($scalar1,$scalar2) = my_subroutine(@array,$scalar1, $scalar2);
print "$scalar1 $scalar2\n";