in reply to well-spaced JAPH

..I like it also in this form:
$ }=sub{ print chr shift} and map$ _ -> $ } ,74,65,80,72,44

found this weird syntax mentioned in moritz's cell and no: perl -le 'push a, 2, 3; print @a' does not work anymore (choroba should know since when ;)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: well-spaced JAPH
by choroba (Cardinal) on Oct 14, 2022 at 09:08 UTC
    I guess this is pre-5.8, so out of my interest :-)

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

      Just tested on 5.8.8 and it works there.

      Update: Also on 5.10.1. Even works on 5.16 albeit with the warning Array @a missing the @ in argument 1 of push() at -e line 1.


      🦛

        OK, I'll try to find time to play with Syntax::Construct to recognise it.
        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        GitHub Actions showed me it was actually removed in 5.22 (they failed with 5.18 and 5.20).

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]