Skip to content
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update perlsecret.ru.pod
  • Loading branch information
mishin committed Oct 18, 2014
commit 7c58f539dc2883e7c8aea1912076bcbd586a277b
26 changes: 14 additions & 12 deletions lib/perlsecret.ru.pod
Original file line number Diff line number Diff line change
Expand Up @@ -398,21 +398,21 @@ https://ru.wikipedia.org/wiki/Дополнительный_код_(предст

(Еще одно имя: "Сатурн")

If you don't understand the name of this operator, consider yourself lucky.
You are advised B<not> to search the Internet for a visual explanation.
Если вы не понимаете имя этого оператора, считайте себя счастливчиком.
Вам рекомендуется B<не> искать его в Интернете для визуального объяснения.

The goatse operator provides a list context to its right side and
returns the number of elements to its left side.
Note that the left side must provide a scalar context; obviously, a list
context on the left side will receive the empty list in the middle.
Оператор гоатсе предоставляет списочный контекст его правую сторону и
возвращает количество элементов на ее левой стороне.
Обратите внимание, что левая сторона должна обеспечивать скалярный контекст; очевидно списочный
контекст с левой стороны будут получать пустой список в середине.

The explanation is that a list assignment in scalar context returns the
number of elements on the right-hand side of the assignment, no matter
how many of those elements were actually assigned to variables. In this
case, all the elements on the right are simply assigned to an empty list
(and therefore discarded).
Объяснение того, что присвоение списка в скалярном контексте возвращает
количество элементов в правой части назначения, независимо от
как много из этих элементов были на самом деле присваивоены переменным. В этом
случае все элементы справа просто передают пустой список
(и поэтому отбрасываются).

# count the words in $_
# считает число слов в $_
$n =()= /word1|word2|word3/g;

# $n = 1
Expand All @@ -421,6 +421,8 @@ case, all the elements on the right are simply assigned to an empty list
# $n = 4
$n =()= "abababab" =~ /a/g;

Оператор goatse представляет собой контейнер (sic), поэтому он также может использоваться для
присвойте значения с правой стороны переменных внутри него.
The goatse operator is a container (sic), so it can also be used to
assign values from the right-hand side to the variables inside it.

Expand Down