>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

Reply via email to