in reply to Experimental push on scalar now forbidden

Thanks to Corion and tybalt89 for their answers - I was nearly there with the former's suggestion with my playing but the latter suggestion would never have crossed my mind as it ('normal' programming language-wise) looks like a completely foreign language - shades of using APL in my past!!! BTW when I said that it threw our system's operation, it wasn't as bad as that (we are testing changes on a non-live system) but it threw our development/testing environment because we couldn't even get it to start due to the non-interpretation of the new script with the Perl version being used. We do know what we are doing. Again many thanks for the assistance. ADB
  • Comment on Re: Experimental push on scalar now forbidden

Replies are listed 'Best First'.
Re^2: Experimental push on scalar now forbidden (override)
by LanX (Saint) on May 22, 2017 at 18:39 UTC
    Sorry I came late, but if you care more about compatibility than speed you could override push et al with backwards compatible functions.

    See subs , perlsub#Overriding-Built-in-Functions and CORE .

    BTW: since I have no access to 5.24 it'll be nice to know what prototype 'CORE::push' returns.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

    PS:

    >  looks like a completely foreign language - shades of using APL in my past!!

    calling the new syntax APL-like is an euphemism.

    I wonder sometimes if P5P has a real long term vision.

      "BTW: since I have no access to 5.24 it'll be nice to know what prototype 'CORE::push' returns."
      $ perl -v | head -2 | tail -1 This is perl 5, version 24, subversion 0 (v5.24.0) built for darwin-th +read-multi-2level $ perl -le 'print prototype "CORE::push"' \@@

      — Ken