"Perl Programmers Reference Guide (англ.) (программ.) /19.12.1998/ " - читать интересную книгу автора and here's another.
THAT Just don't forget that you have to put a semicolon on the end to finish the statement, as Perl doesn't know you're not going to try to do this: print < ABC + 20; LLLLiiiisssstttt vvvvaaaalllluuuueeee ccccoooonnnnssssttttrrrruuuuccccttttoooorrrrssss List values are denoted by separating individual values by commas (and enclosing the list in parentheses where precedence requires it): (LIST) In a context not requiring a list value, the value of the list literal is the value of the final element, as with the C comma operator. For example, assigns the entire list value to array foo, but $foo = ('cc', '-E', $bar); assigns the value of variable bar to variable foo. Note that the value of an actual array in a scalar context is the length of the array; the following assigns the value 3 to $foo: @foo = ('cc', '-E', $bar); $foo = @foo; # $foo gets 3 You may have an optional comma before the closing parenthesis of a list literal, so that you can say: @foo = ( 1, 2, 3, ); LISTs do automatic interpolation of sublists. That is, when a LIST is evaluated, each element of the list is |
|
|