Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004

    Unanswered: Newbie question : how to print this hash ?

    Hi all,

    I have a code which uses a hash defined like this :


    where x, y and z run from 0 to N (each).
    Does someone know how to print all elements of "MATRIX" in a single
    line (separated by a single space and all numbers formatted by %15.6F)
    but looping over indexes z, y and x, respectively ?

    In Fortran this is trivial :

    WRITE(*,'(8000000E15.6)') (((matrix(x,y,z),x=0,N),y=0,N),z=0,N)

    since the outer loop is Z, followed by Y and X.

    I can't figure it out how to do the same in Perl.

    Thank you in advance for any insights !

    Last edited by Serg; 02-20-07 at 18:03.

  2. #2
    Join Date
    Feb 2004
    Problem solved.

    (it was not a hash but a multi dimensional array)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts