in reply to Re: Why do I get this error?
in thread Why do I get this error?

But I have a Array of Arrays there...
How can I use join?
Also, if you use foreach, doesn't it mean that you lose the order of elements? Or not?

Replies are listed 'Best First'.
Re^3: Why do I get this error?
by LanX (Saint) on May 12, 2014 at 00:58 UTC
    > But I have a Array of Arrays there...

    $elem is an array ref, you can also call it $a_ref or whatever explains best the content ($a_row for instance)

    > How can I use join?

    like shown, did you notice the @ in front of @$elem, it dereferences the array ref.

    > Also, if you use foreach, doesn't it mean that you lose the order of elements?

    Nope! Try it out...

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      Thank you for your help! Unfortunatelly it doesn't work, it still says the same thing! Actually, this code worked just fine, but I wanted to implement the "use strict" mode and added "my" etc and now I get this stupid error... The printing is done, but the warning remains (as it was before)...
Re^3: Why do I get this error?
by Anonymous Monk on May 12, 2014 at 00:53 UTC
    And regarding the $", I didn't do anything, it's actually first time I come across this thing...I don't know what I am supposed to do to be honest!
      > I didn't do anything,

      Well someone did cause Perl doesn't without being told so.

      It's a global variable, who knows where it happens in your code.

      Thats why we preach to always localize any change to special vars.

      Cheers Rolf

      ( addicted to the Perl Programming Language)

      PS: It's late, good night! :)