Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: The Backslash Challenge

by LanX (Saint)
on Mar 25, 2021 at 02:18 UTC ( [id://11130309]=note: print w/replies, xml ) Need Help??


in reply to The Backslash Challenge

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

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

update

added trailing ; to debugger examples

Replies are listed 'Best First'.
Re^2: The Backslash Challenge
by choroba (Cardinal) on Mar 25, 2021 at 07:45 UTC
    Nice trick!

    Interestingly, it doesn't work for me. In the debugger, I'm getting

    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]
      > 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 :(

      update

      yes a use DB; at the start of the script is "fixing" it.

      Actually that could be a source of a Heisenbug.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery

        > yes a use DB; at the start of the script is "fixing" it.

        Not only the DB. English works, too :-o

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-20 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found