Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: need help to create array dynamically

by dasgar (Priest)
on Jan 23, 2013 at 20:04 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1015012]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-25 14:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found