Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Loading multiple identical variables in array with multiplication variable

by AnomalousMonk (Bishop)
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 meditating upon the Monastery: (4)
As of 2019-10-19 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?