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 (Chancellor)
on Sep 24, 2014 at 16:48 UTC ( #1101831=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @arr = (('A') x 20, ('T') x 20, ('C') x 30, ('G') x 30);
    
  2. or download this
    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 wandering the Monastery: (8)
As of 2019-06-25 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (106 votes). Check out past polls.

    Notices?