Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: 2D array in Perl

by choroba (Cardinal)
on Jun 20, 2013 at 19:37 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1040016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-16 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found