Re: performance: pop? shift? or another way?

2002-07-05 Thread Connie Chan
AIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 05, 2002 3:59 PM Subject: Re: performance: pop? shift? or another way? > > thx to all, grep seems to be the best way to do it. > > greetings > michael > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: performance: pop? shift? or another way?

2002-07-05 Thread Michael Rauh
thx to all, grep seems to be the best way to do it. greetings michael -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: performance: pop? shift? or another way?

2002-07-05 Thread Toby Stuart
use strict; use warnings; my @list = qw(0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1); my @out; @out = grep($_ != 0, @list); foreach (@out){ print $_, "\n"; } -Original Message- From: Michael Rauh [mailto:[EMAIL PROTECTED]] Sent: Friday, July 05, 2002 4:40 PM To: Beginners, Perl Subject: p

Re: performance: pop? shift? or another way?

2002-07-05 Thread Janek Schleicher
Michael Rauh wrote at Fri, 05 Jul 2002 08:39:42 +0200: > hi, > > say i have an unsorted (large) list of, e.g., 0's and 1's: > > @list = (0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, ...) > > i now want to remove all the zeros, using the fastest way possible. how would U do >that? When it is so import