/--- On Wed, Aug 02, 2000 at 12:20:14PM +0100, Piers Cawley wrote: | > 1, $__ variable, which is the result of the last operation, e.g: | > my $pname = $self->{db} && $__->{product} && $__->offers && | > $__->{ | > $product_id } && $__->{name} | > 2, &&$ operator, which can be used like that: | > my $pname = $self->{db &&$ ->{product} &&$ ->offers &&$ -> { | > $product_id } &&$ ->{name}; | > I suggest the second, because it is more straightforward, but | > the | > first is more flexible. | | reduce {last unless defined $a; eval "\$a->$b"} $self, | qw/{db} {product} offers {$product_id} {name}/; | | Hmm... that is a tad unwieldy. And we don't have reduce yet. And | I'm | not entirely sure that last would work how you want it to... \--- Where I can find the "reduce" command? I understand how it works, but this is *VERY* dirty. The $pname=eval{ ... } block is much cleaner... But what about the suggestion? Is it a good suggestion? How will I make it formal? dLux -- perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'