For example, my @array = (1, 2, 3); foreach my $element (@array) { # Increment $element, thus automatically # modifying @array, since $element is ''aliased'' # to each of @array's elements in turn. $element++; } print "@array \n"; will print out "2 3 4" as a result.
Наприклад: my @array = (1, 2, 3); foreach my $element (@array) { # Increment $element, thus automatically # modifying @array, since $element is ''aliased'' # to each of @array's elements in turn. $element++; } print "@array \n"; Виведе на екран результат: «2 3 4».