ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
3.2.72 grepgrep This function evaluates Presuming @code_lines = grep !/^#/, @all_lines; Since $_ is a reference into the list value, altering $_ will modify the elements of the original list. While this is useful and supported, it can occasionally cause bizarre results if you aren't expecting it. For example: @list = qw(barney fred dino wilma); @greplist = grep { s/^[bfd]// } @list;
See also map. The following two statements are functionally equivalent: @out = grep { |