Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (3) Sorting strings

by demerphq (Chancellor)
on Aug 31, 2001 at 06:51 UTC ( [id://109273]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Sorting strings
in thread Sorting strings

but if I want to get it through the reference I have to do

That should be:

but if I want to use the array that $array refrences I have to do

Sorry, I changed the example slightly and didnt change that line.

Anyway, the point to keep in mind that

$_=[]; # $_ now is a refrence to empty array (anonymous array) $_[0]=[]; # the zeroth element of the array @_ $_->[0]=[];# the zeroth element of the anonymous array $_{0}=[]; # the value associated with 0 in %_ $_{0}->[0]; # element zero in ^^^^^^^^ $_[0]->[0]; #zeroth element in array refrenced by the zeroth elemtn + of @_ $_->[0][0]={}; #dont need a second -> $_->{0}[0]={}; #this works too $_->[0]->[0]->{0}="but we can use -> if we want"; $_->{0}[0]{0}="This is getting confusing";
I dont think %_ is used that much, but I could be wrong.

Yves

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2024-04-23 08:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found