Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Multidimensional Arrays

by chipmunk (Parson)
on Jun 22, 2001 at 20:18 UTC ( #90776=note: print w/ replies, xml ) Need Help??


in reply to Multidimensional Arrays

The syntax @array->[0] is unsupported; it was never really intended to work in the first place.

The perldelta that comes with 5.6.1 explains:

Arrow operator and arrays When the left argument to the arrow operator "->" is an array, or the "scalar" operator operating on an array, the result of the operation must be considered erroneous. For example: @x->[2] scalar(@x)->[2] These expressions will get run-time errors in some future release of Perl.
I think that your tutorial is somewhat misleading, because you seem to suggest that @array->[0] is a standard idiom.


Comment on Re: Multidimensional Arrays
Select or Download Code
Re: Multidimensional Arrays
by CharlesClarkson (Curate) on Jun 23, 2001 at 11:14 UTC

    Well, I haven't gotten aroud to installing 5.6.1 and I probably would have missed this. Would you mind rereading the tutorial. I edited it with your comment in mind and would like to know if it screwed up the logical flow.


    Thank You,
    Charles
      great tutorial. I was really struggling trying to grasp the concept, I had read everything I could, but nothing seemed to sink in until I read this article! Charles, you have a gift. I almost did not read the article due to the name, perhaps you could mention reference. I wish some of the posts on why NOT to use symbolic references had a link to this article... Another intersting chapter might be using hashes in a reference.
        I now have complete multidimentional wisdom, and it took less than 10 minutes to comprehend (incl intermissions). I'm not saying that everyone elses tutorials are rubbish. I just believe some people tune into certain styles of writing, and this is one style I can tune into. Well done!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://90776]
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: (14)
As of 2014-09-03 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (35 votes), past polls