Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: 2D array in Perl

by choroba (Chancellor)
on Jun 20, 2013 at 19:37 UTC ( #1040016=note: print w/replies, xml ) Need Help??


in reply to 2D array in Perl

The reason is different version of Perl. In older versions of Perl, the first argument of push must be an array. Nowadays, you can use an array reference as well. The Windows box has the newer version, while the Linux one has a version that does not support the feature yet.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: 2D array in Perl
by Perl_ca_user (Initiate) on Jun 20, 2013 at 19:47 UTC

    I see...so what is the correct syntax if I want to run it in Linux?

      what is the correct syntax if I want to run it in Linux?

      See the answer in Re: 2D array in Perl by Brother hdb.
      That one should do what you want with both perl versions and both operating systems.

      Cheers, Sören

      (hooked on the Perl Programming language)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040016]
help
Chatterbox?
[LanX]: interpolation! like in a "string"
[Lady_Aleena]: LanX, I just never thought I would be explaining perl regex to others. It is usually others explaining why a regex isn't working to me.
[Discipulus]: congratulations shmem! (was my last upvote? ;=)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2017-04-28 09:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (520 votes). Check out past polls.