Re: The Backslash Challenge (updated)
by haukex (Archbishop) on Mar 24, 2021 at 20:29 UTC
|
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
| [reply] [Watch: Dir/Any] |
Re: The Backslash Challenge
by choroba (Cardinal) on Mar 24, 2021 at 22:11 UTC
|
OK, here are some solutions I was able to find:
-->>
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
| [reply] [Watch: Dir/Any] [d/l] [select] |
Re: The Backslash Challenge
by LanX (Saint) on Mar 25, 2021 at 02:18 UTC
|
The goal is maximum obfuscation, right? ;)
The second one requires a recent Perl but can be easily rewritten to work with older versions. :)
update
also tried this but see comment
update
added trailing ; to debugger examples | [reply] [Watch: Dir/Any] [d/l] [select] |
|
cont:
Can't find string terminator "\" anywhere before EOF at (eval 13)[/usr
+/lib/perl5/5.26.1/perl5db.pl:738] line 2.
at (eval 13)[/usr/lib/perl5/5.26.1/perl5db.pl:738] line 2.
eval '' called at /usr/lib/perl5/5.26.1/perl5db.pl line 738
DB::eval called at /usr/lib/perl5/5.26.1/perl5db.pl line 3140
DB::DB called at -e line 1
And if I run it in a script instead, the output is _, not \ :-o
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
> cont:
A backslash at EOL marks a multiline statement in DB. I had a trailing whitespaces to avoid this, but the C&P from cmd.exe erased them. :( Fixed now!
> And if I run it in a script instead, the output is _, not \ :-o
both lines? lemme check...
...
Argh! Seems that the context of the debugger is initializing a "crucial thing" which can't be taken for granted :(
$\ is not in the symbol table til it's first set
update
yes a use DB; at the start of the script is "fixing" it.
Actually that could be a source of a Heisenbug.
| [reply] [Watch: Dir/Any] [d/l] |
|
Re: The Backslash Challenge
by LanX (Saint) on Mar 24, 2021 at 20:56 UTC
|
| [reply] [Watch: Dir/Any] [d/l] |
|
| [reply] [Watch: Dir/Any] [d/l] |
|
| [reply] [Watch: Dir/Any] |