Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995039]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-03-21 06:12 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (264 votes). Check out past polls.