ЭЛЕКТРОННАЯ БИБЛИОТЕКА КОАПП |
Сборники Художественной, Технической, Справочной, Английской, Нормативной, Исторической, и др. литературы. |
3.2.131 scalarscalar This pseudo-function may be used within a For example: local($nextvar) = scalar <STDIN>; prevents Of course, a simpler way with less typing would be to simply leave the parentheses off, thereby changing the list context to a scalar one: local $nextvar = <STDIN>; Since a print function is a
print "Length is ", scalar(@ARRAY), "\n"; if you want the length of One never needs to force evaluation in a list context, because any operation that wants a list already provides a list context to its list arguments for free. So there's no list function corresponding to scalar. |