Subject: | New functionality request |
Originally posted in:
http://www.perlmonks.com/?displaytype=print;node_id=1047049;replies=1
Here's a concise summary:
## proposed solution
my $result; first_value { $result = foobar($_) } @list;
## desired solution
my $result = first_result { foobar($_) } @list ;
Specifically, this request is to add first_result() with functionality described in the sample.
The purpose is to short-circuit the call to foobar(). Notwithstanding, last_result() would also be helpful, especially for orthogonality.
Thanks!