Perl і порожній список.
When used on the right-hand side of an assignment, the () construct represents an empty list. In scalar context, this evaluates to undef. In list context, it is an empty list. When used on the left-hand side of an assignment, the () construct imposes list context. To count the number of elements returned from an expression in list context without using a temporary variable, use the idiom (Idioms, pp. 162):
my $count = () = get_all_clown_hats();
Because of the right associativity (Associativity, pp. 65) of the assignment operator, Perl first evaluates the second assignment by calling get_all_clown_hats() in list context. This produces a list. Assignment to the empty list throws away all of the values of the list, but that assignment takes place in scalar context, which evaluates to the number of items on the right hand side of the assignment. As a result, $count contains the number of elements in the list returned from get_all_clown_hats().
„Modern Perl“. 2011-2012 edition.