>This is what I'd consider good style:
> my @output =
> map { $_->[0] }
> sort { $a->[1] cmp $b->[1] }
> map { [>$_<, expensive_func($_)] } # print original lines
> <>;
>(Modified from <http://www.perlmonks.org/index.pl?node_id=9108>)
>The main point of this statement is the Schwartzian Transform, but it
>also prints the original lines en passant.
Again, I can't *ever* remember wanting a function that did this. Rare things
shouldn't have hard-to-figure-out names. Why do you want it? Debugging or
something? Have you tried tie?
--tom
- Re: RFC 39 (v3) Perl should have... Nathan Wiger
- Re: RFC 39 (v3) Perl should have a pr... Tom Christiansen
- Re: RFC 39 (v3) Perl should have... Bart Lateur
- Re: RFC 39 (v3) Perl should ... Tom Christiansen
- Re: RFC 39 (v3) Perl should ... Ask Bjoern Hansen
- Re: RFC 39 (v3) Perl should ... Bart Lateur
- Re: RFC 39 (v3) Perl should ... Chaim Frenkel
- Re: RFC 39 (v3) Perl should ... Ask Bjoern Hansen
- Re: RFC 39 (v3) Perl should ... Jonathan Scott Duff
- Re: RFC 39 (v3) Perl should have a print ... Tom Christiansen
- Re: RFC 39 (v3) Perl should have a print oper... Tom Christiansen
- Re: RFC 39 (v3) Perl should have a print ... Jon Ericson
- Re: RFC 39 (v3) Perl should have a pr... Tom Christiansen
- Re: RFC 39 (v3) Perl should have a print operator Bart Lateur
- Re: RFC 39 (v3) Perl should have a print operator Jon Ericson
- Re: RFC 39 (v3) Perl should have a print oper... Peter Scott
