Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: strange syntax: $#array

by parv (Parson)
on Jun 17, 2015 at 06:18 UTC ( [id://1130758]=note: print w/replies, xml ) Need Help??


in reply to Re: strange syntax
in thread strange syntax

On the same lines if last-index-of-array variable, $#x, is assigned -1, array becomes empty (mentioned in perldata) ...

DB<1> @x = ( 1 , 2 ) DB<2> x @x 0 1 1 2 DB<3> $#x = -1 DB<4> x @x empty array DB<5>

Log In?
Username:
Password:

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

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

    No recent polls found