[33106] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 4382 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Mar 2 03:09:17 2015

Date: Mon, 2 Mar 2015 00:09:02 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 2 Mar 2015     Volume: 11 Number: 4382

Today's topics:
    Re: function returning a list of the indices of its tru <gravitalsun@hotmail.foo>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 01 Mar 2015 23:09:45 +0200
From: George Mpouras <gravitalsun@hotmail.foo>
Subject: Re: function returning a list of the indices of its true arguments
Message-Id: <mcvv6s$26sk$1@news.ntua.gr>

On 27/2/2015 4:00 μμ, gamo wrote:
> El 26/02/15 a las 22:31, Rainer Weikusat escribió:
>> sub trues
>> {
>>      map { $_[$_] ? $_ : () } 0 .. $#_;
>> }
>>
>> I actually needed this for something and found it rather amusing.
>

nothing fancy but anyway


sub trues3
{
my @B;

	while (my @A = each @_ )
	{
	push @B, $A[0] if $A[1]	
	}
@B
}



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 4382
***************************************


home help back first fref pref prev next nref lref last post