Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: need help to create array dynamically

by dasgar (Curate)
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:

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015012]
help
Chatterbox?
[holli]: Corion is well off. I am sure there is a script of his running in the frankfurt banking data center, diligently mining bitcoins ;-)
[Corion]: holli: Hahaha :-D

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2017-09-21 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (249 votes). Check out past polls.

    Notices?