[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] aCertainName.pm



At 09:36 AM 11/9/99 -0800, tallwine@carol.ixlabs.com wrote:
>Wouldn't this be better?
>
>sub abs {
>         return 0 unless @_;
>         return ($_[0] >= 0)?$_[0]:-$_[0];
>}
>
>And it even runs faster too.

Sounds like a disadvantage given the requirements :-)

How about:

sub values { my $i; grep $i++ %2, @_ }


--
Peter Scott
Pacific Systems Design Technologies


==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe