Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: 2D array in Perl

by choroba (Abbot)
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.

لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ


Comment on Re: 2D array in Perl
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-11-29 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (203 votes), past polls