array handling in perl

Discussion in 'Perl' started by Folkert van Heusden, Feb 13, 2007.

  1. Hi,

    I have 2 arrays:
    $b[0...7][0...7]
    $s[0...7][0...7]
    on which I would like to do
    - set each field to ' ' ($b) and to 0 ($s)
    - make a copy of both whole arrays into other arrays

    Now normally I would for($y=0; $y<8; $y++){for($x=0;$x<8;$x++){ $b[$y][$x] =
    ' '; } } but I'm trying to find something faster.

    --
    --------------------------------------------------------------------
    Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
    Folkert van Heusden, Feb 13, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dpackwood
    Replies:
    3
    Views:
    1,784
  2. Mark Tarver
    Replies:
    22
    Views:
    1,298
    J Kenneth King
    Apr 26, 2009
  3. Peter
    Replies:
    34
    Views:
    1,932
    James Kanze
    Oct 17, 2009
  4. Iñaki Baz Castillo
    Replies:
    1
    Views:
    182
    Iñaki Baz Castillo
    Apr 15, 2008
  5. Replies:
    6
    Views:
    159
    Peter Scott
    Oct 31, 2006
Loading...

Share This Page