--- Jonathan Scott Duff <[EMAIL PROTECTED]> wrote: > On Mon, Mar 31, 2003 at 12:12:54PM -0800, Michael Lazzaro wrote: > > Don't those return C<undef>, as opposed to the value of C<$_>? > > I.E. wouldn't it be: > > > > $_ and return $_ given big_calculation(); > > -or- > > given big_calculation() { > > return $_ when true; > > } > > Personally I'd just use > > return big_calculation();
I started to suggest this myself, then realized that you might not want it to return at all if the value is false. Maybe you're looking for the first nonzero return in a set on inputs: my $y; for my $x (@data) { return $y if $y = big_calc($x); } Otherwise, I'd *definitely* just return big_calc(); __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com