Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: One of these things is not like the others...

by McA (Deacon)
on Oct 22, 2013 at 18:34 UTC ( #1059243=note: print w/ replies, xml ) Need Help??


in reply to One of these things is not like the others...

The question is: What Perl version do you have on the dev box and what version do you have on the production machines?

Since Perl 5.14 the first expression to the function push can also be a array ref.

McA


Comment on Re: One of these things is not like the others...
Re^2: One of these things is not like the others...
by kennethk (Monsignor) on Oct 22, 2013 at 18:36 UTC

    From push:

    Starting with Perl 5.14, push can take a scalar EXPR, which must hold a reference to an unblessed array. The argument will be dereferenced automatically. This aspect of push is considered highly experimental. The exact behaviour may change in a future version of Perl.
    Update: (which McA pointed out in an update)

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

      While looking up the version which introduced the new behaviour you answered it. A ++ for that.

      UPDATE: I've decided to upvote all answers which came in more or less at the same time referencing the new behaviour. It came faster in than I could hit the reload button. :))

      McA

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-07-13 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (249 votes), past polls