Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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?
[MidLifeXis]: Has anyone been successful running prove under Windows with a --jobs parameter? It appears, even with (what appears to be) appropriately- configured parameters and up to date Test::Harness/TAP ::Harness that tests are still running serially.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2016-12-06 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (112 votes). Check out past polls.