very empty has asked for the wisdom of the Perl Monks concerning the following question:
my $oldelem=0 # which cannot occur. foreach $elem (@elements) { do_something_with($oldelem,$elem) unless $oldelem==0; $oldelem=$elem; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Traversing succeding sets of an array
by thelenm (Vicar) on May 14, 2002 at 15:42 UTC | |
|
Re: Traversing succeding sets of an array
by broquaint (Abbot) on May 14, 2002 at 15:34 UTC | |
|
Re: Traversing succeding sets of an array
by bmcatt (Friar) on May 14, 2002 at 15:44 UTC | |
|
Re: Traversing succeding sets of an array
by strat (Canon) on May 14, 2002 at 15:40 UTC | |
by very empty (Scribe) on May 14, 2002 at 16:13 UTC | |
|
Re: Traversing succeding sets of an array
by Util (Priest) on May 14, 2002 at 16:06 UTC | |
|
Re: Traversing succeding sets of an array
by boo_radley (Parson) on May 14, 2002 at 16:42 UTC |