I have an array of objects and these objects have a method that returns a string. Now I'm looking for a one-liner to get an array of these strings for all objects. So I'm searching a Perl equivalent to the Python-esque
[ $_->my_method() for $_ in @my_list].I already found List::Comprehensions, which does exactly what I need, but I can't install it due to a failed test.
In reply to List Comprehensions by tobbo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |