Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 romping around the Monastery: (3)
As of 2024-07-23 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.