in reply to Re: chomp each element of array
in thread chomp each element of array
the array is evaluated in a list context.
Huh, it sounds a bit like a tautology, doesn't it? (Even though an array may be evaluated in a scalar context and return in this case the number of elements.)
I would rather say that the array is imposing a list context and that the chomp operator is used in a list context in this case. And, in such a case, it chomps all the elements of the list (and returns the total number of characters removed)
Note that if used on a hash, it chomps the hash's values, but not its keys.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: chomp each element of array
by LanX (Saint) on Jun 10, 2013 at 16:23 UTC |