Next Tricks of the Wizards 173

Iterator Example

        my $it = make_iterator('foo-#-bar#');
        for (1..105) {
          my $s = $it->();
          print "$s\n";
        }
        # Prints foo-0-bar0, foo-0-bar1, 
        #        ..., 
        #        foo-9-bar8, foo-9-bar9, ...


Next Copyright © 2003 M. J. Dominus