in reply to Re^9: use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20
in thread use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20

Sure, Perl has special ops for non-flattening iteration of arrays and hashes, but it doesn't have an iteration interface so you can't write your own non-flattening iterator.

  • Comment on Re^10: use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20

Replies are listed 'Best First'.
Re^11: use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20
by BrowserUk (Patriarch) on Nov 25, 2013 at 22:48 UTC

    I guess I am still misunderstanding you because it quite easy and very common to use a sub ref closing over a counter as an iterator for use with while. By way of example, see Algorithm::Combinatorics

    I'm not seeing the difficulty you are alluding to, so perhaps you could clarify for me?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^11: use feature 'postderef'; # Postfix Dereference Syntax is coming in 5.20
by ikegami (Patriarch) on Dec 01, 2013 at 17:38 UTC