http://qs321.pair.com?node_id=739777


in reply to Re^5: Hard syntax error or disambiguable parsing?
in thread Hard syntax error or disambiguable parsing?

Ahhhh... and he was enlightened. Basically, $i here is operated on as if it was:

my $i; foreach local $i (0 .. 5){ ... }

Do you have any ideas/pointers to the rationale for "no array members?" I understand that it is so, but fail to understand why it is so, when (for instance) one can local-ize individual array members.

for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";

Replies are listed 'Best First'.
Re^7: Hard syntax error or disambiguable parsing?
by GrandFather (Saint) on Jan 29, 2009 at 06:05 UTC

    Nope, not that either. A Perl for loop variable is magical - there is no simple "equivalent" syntax that conveys what is going on under the hood. See my reply to your earlier node for (I hope) some real enlightenment.


    Perl's payment curve coincides with its learning curve.