Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^4: Help with arrays

by fluffyvoidwarrior (Monk)
on Sep 22, 2012 at 05:01 UTC ( [id://995039]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Help with arrays
in thread Help with arrays

Perl is a pretty much untyped, dynamic language. When declaring an array in Perl you don't need to specify how big you intend it to be or what it contains. It will expand and shrink at runtime depending what you do with it.
I imagine the problem is aimed at illustrating this and ensuring that you know how to handle it.
So, all arrays are of unknown length unless you know what you put in them or you find out with:
$size = @nums; or $last_index = $#nums

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-03-19 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found