Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: need help to create array dynamically

by dasgar (Deacon)
on Jan 23, 2013 at 20:04 UTC ( #1015012=note: print w/ replies, xml ) Need Help??


in reply to need help to create array dynamically

Perhaps I'm misunderstanding your post, but it kind of sounds like you're trying to determine the size of the array for the purpose of creating an array with that number of elements. In Perl, you don't need to know the planned/needed size of the array to create the array. In your code, you just need something like my @list; to create an empty array named 'list'.

You might find the following perldocs useful:


Comment on Re: need help to create array dynamically
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-09-15 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls