Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2016-07-30 19:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (266 votes). Check out past polls.