in reply to Other form of greediness in Perl

Parameters passing and return values are greedy.

It has nothing to do with parameter passing or values being returned. It's assigning a list to an array that's "greedy". It doesn't matter if the RHS of the assignment is @_ or a function call.

my (@array, $scalar) = (1, 2, 3); print(scalar(@array), "\n"); # 3 print(defined($scalar)?1:0), "\n"); # 0

Replies are listed 'Best First'.
Re^2: Other form of greediness in Perl
by naikonta (Curate) on Oct 01, 2007 at 17:38 UTC
    It's supposed to be related with the opening,
    There are some functions, constructs, or areas where 'greediness' in fact exists...
    So, yes, it's not about the passing and returning. Rather, the greediness could happen in both events. I did mention about the array assignment that is greedy. Thanks, ikegami, I will update the sentence.

    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!