Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Loading multiple identical variables in array with multiplication variable

by AnomalousMonk (Chancellor)
on Sep 24, 2014 at 16:48 UTC ( #1101831=note: print w/replies, xml ) Need Help??


in reply to Loading multiple identical variables in array with multiplication variable

I.e.,

my @arr = (('A') x 20, ('T') x 20, ('C') x 30, ('G') x 30);

Update: Or perhaps:

my @arr = map { ($_->[0]) x $_->[1] } [A => 20], [T => 20], [C => 30], [G => 30] ;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2019-05-25 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (152 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!