Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Concatenation on Varibale Name

by aitap (Deacon)
on Oct 17, 2012 at 17:59 UTC ( #999588=note: print w/ replies, xml ) Need Help??

in reply to Concatenation on Varibale Name

It looks like you need an array:

my @var; for my $a (1..10) { $var[$a] = 5 + $a; }
Arrays are sorted and consume less memory than hashes, but allow only integer indexes (instead of arbitrary strings as hash indexes).
Sorry if my advice was wrong.

Comment on Re: Concatenation on Varibale Name
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2015-12-01 10:03 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (798 votes), past polls