Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: Hard syntax error or disambiguable parsing?

by pobocks (Chaplain)
on Jan 29, 2009 at 05:53 UTC ( #739777=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://739777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2022-08-15 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?