Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Code won't proceed after input.

by Athanasius (Chancellor)
on Jan 23, 2013 at 16:06 UTC ( #1014940=note: print w/replies, xml ) Need Help??


in reply to Re: Code won't proceed after input.
in thread Code won't proceed after input.

my @AAOcc = map { 0 } 1 .. 20;

Or just:

my @AAOcc = (0) x 20;

:-)

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^3: Code won't proceed after input.
by AnomalousMonk (Canon) on Jan 23, 2013 at 16:09 UTC

    Or better yet IMHO:

    >perl -wMstrict -le "my @AAMatrix = qw( A C D E F G H I K L M N P Q R S T V W Y ); ;; my @AAOcc = (0) x @AAMatrix; print qq{@AAOcc}; " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
      I ran out of votes before getting to your comment, but I definitely approve as it solves a common mistake where manual sizing of multiple arrays is involved
      A Monk aims to give answers to those who have none, and to learn from those who know more.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1014940]
help
Chatterbox?
[Lady_Aleena]: Module is currently 104 lines but will shirnk to 63. The script using the module is currently 40 lines but will grow to 82, 180 to 146 lines total. (This is after rewrting the data files.)

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-05-29 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?