Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1040016]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (12)
As of 2016-10-28 15:00 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (385 votes). Check out past polls.