Revision e406d7df-5f24-43d8-8e68-db65bdd2d585 - Code Golf Stack Exchange

## [Perl 5], 92 bytes

__91 bytes code + 1 for `-p`.__

This will probably only work on *nix machines and also relies on the details in [this meta post for empty input][1] (which TIO doesn't support, so a newline is provided - and never used).

<!-- language-all: lang-perl -->

 ${$_=qq{Lg\LLL$*= w$*RLD=}&qq=y}\LLL$*L _$*RLDA=}=${$*=`\LPRINTF \\\\X$_`}=$A{y?0?F?}=$_=$=

[Try it online!][TIO-j5tqhvva]

###Explanation

The basis for this script is utilising the `&` operator on strings, [I was able to get `Hell0, W0rld!` just using][2]:

 $_=qq{Lg\LLL0= w0RLD=}&qq=y}\LLL0L _0RLDA=
 # qq{} is a a synonym for ""
 # \L converts the remainder of the string to lowercase
 # I found these chars lazily by brute forcing all combinations and grepping for the desired char

Getting the `o` was a little more tricky however. Fortunately, the hex char code for `o` is `6F` and `$=` is pre-initialised to `60`, knowing this meant I could utilise the `y{}{}` operator to change `0` to `F` with some trickery:

 $_=$=; # $_ is now 60 both valid variable names!
 y?0?F?; # y (alias for tr///, you can use any delimiter) works on $_ by default, $_ is now 6F
 $*=`\LPRINTF \\\\X$_`; # $* is now o
 # I used $* instead of $A or something so I don't need to do ${A} when it's followed by another letter, a warning is displayed in the console, but these are ignored by default.

Chaining this all up without `;` or `,` was a little tricky as well, but I was able to chain assign to variables and hashes in the reverse order of how I needed things to happen, which gives the desired result.

This was a lot of fun and I've been tinkering on and off for about a day. Great idea for a challenge!

[Perl 5]: https://www.perl.org/
[TIO-j5tqhvva]: https://tio.run/##K0gtyjH9/1@lWiXetrCw2ic9xsfHR0XLVqFcRSvIx8W2Vq2w0LayFiLqoxAPFnW0rbUF6tCyTYjxCQjy9AtxU4gBggiV@ASghGN1pb2BvZs9kBlvq2L7/z/Xv/yCksz8vOL/ugUA "Perl 5 – Try It Online"


 [1]: https://codegolf.meta.stackexchange.com/a/7172/9365
 [2]: https://tio.run/##K0gtyjH9/18l3rawsNonPcbHx8fAVqHcIMjHxbZWrbDQtrIWLOajEA8Sc7T9/5/rX35BSWZ@XvF/3QIA

AltStyle によって変換されたページ (->オリジナル) /