, . . , :
Perl . . , , . :
foo(@first, @second);
, , - , . . , , :
@common_keys = common(%hash1, %hash1);
, .
- :
foo(\@first, \@second);
@common_keys = common(\%hash1, \%hash2);
, . -. , , .
- . - , . , 10 000 000 . . , , . . .
, , . , .
use strict;
use warnings;
my @array = qw(this that the other);
foo (@array);
print join ( ":", @array ) . "\n";
sub foo {
my @foo_array = @_;
$foo_array[1] = "FOO";
}
, foo 1 . , @array foo, @array. , ( my @foo_array = @_;). , .
, :
this:that:the:other
, , , , , :
use strict;
use warnings;
my @array = qw(this that the other);
foo (\@array);
print join ( ":", @array ) . "\n";
sub foo {
my $foo_array_ref = shift;
$foo_array_ref->[1] = "FOO";
}
, :
this:FOO:the:other
, , . , @array. , . .
, , . , :
sub foo {
my @foo_array = @{ shift() };
. , , , . 1980- , , . Quadcore , . 10 , , , .
. . , .
- Perl . , , .
. ( ). , . :
return $self->{COUNT_HASH};
, , ? , . , , . , :
my %hash_counts = % { $self-{COUNT_HASH} };
return \%hash_count;
, . . , , .
, wantarray, , :
my %hash_counts = %{ $self->{COUNT_HASH} };
return want array ? %hash_counts : \%hash_counts;
, :
my %hash_counts = $object->totals();
my $hash_counts_ref = $object->totals();
1 : @_ , . , foo(@array), $_[1] = "foo";, @array.