- or download this
sub second {
my $num_ref = shift;
...
return $sum;
}
- or download this
my $result = second( @num );
sub second {
my ( @array ) = @_;
# etc
- or download this
my $result = second( \@num );
...
my ( $aref ) = @_;
my @new_array = @$aref;
# my $new_ref = [ @$aref ]; # alternative