Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

well-spaced JAPH

by Discipulus (Abbot)
on Oct 13, 2022 at 10:21 UTC ( #11147397=obfuscated: print w/replies, xml ) Need Help??

$_ = sub { print chr shift }; 74->$ _; 65->$ _; 80->$ _; 72->$ _; 44->$ _;

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: well-spaced JAPH
by Discipulus (Abbot) on Oct 14, 2022 at 07:17 UTC
    ..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.
      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.


        🦛

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://11147397]
Approved by kcott
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2023-02-01 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?