Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Getting last valid index from a particular list in a @LoL

by willick (Novice)
on Oct 16, 2001 at 20:37 UTC ( [id://119177]=perlquestion: print w/replies, xml ) Need Help??

willick has asked for the wisdom of the Perl Monks concerning the following question:

Say you have a list of lists (@LoL) that contains 5 lists and the third list contains 6 entries. Can you not get the last valid index value easily from that third list if you didn't know what it was? I was thinking that something like the following would work...

my $last_valid_index_val_for_list3 = $#LoL[3];

Replies are listed 'Best First'.
Re: Getting last valid index from a particular list in a @LoL
by davorg (Chancellor) on Oct 16, 2001 at 20:44 UTC
      You hit the nail on the head...sweet. Thnx a million bro'!

      willick
Re: Getting last valid index from a particular list in a @LoL
by mikeB (Friar) on Oct 16, 2001 at 20:47 UTC
    Hmmm... didn't like the answer you were given in the CB?? Why ask again here?
    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-25 10:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found