Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Answer: How do I find the index of the last element in an array?

by jens (Pilgrim)
on Oct 14, 2002 at 04:30 UTC ( [id://204971]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    @letterList = ("a", "b", "c", "d");
    #refer to the last array index 
    #using '$#array' syntax:
    
    print $#letterList;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-20 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found