I'm trying to write an XS module that will allow people to move forward
(or backward) within a for(each) loop.  The canonical example would be:

  my @data = (1 .. 10) {

  for (@data) {
    my $next = For::next_iter();
    print "$_, $next\n";
  }

And the output would be

  1, 2
  3, 4
  5, 6
  7, 8
  9, 10

I've tried writing code that modifies PL_markstack_ptr, but I'm afraid my
changes aren't effecting the code at all.  Does anyone know how to go
about doing this?  I'm under the impression I need to access a "saved"
version of PL_markstack_ptr (that's been pushed onto the stack) and work
on it there, but I don't know how to do that.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
CPAN ID: PINYAN    [Need a programmer?  If you like my work, let me know.]
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.


Reply via email to