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

Re^4: Help with arrays

by fluffyvoidwarrior (Monk)
on Sep 22, 2012 at 05:01 UTC ( #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

Comment on Re^4: Help with arrays

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2015-11-25 02:55 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (669 votes), past polls