Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: The Backslash Challenge

by choroba (Cardinal)
on Mar 25, 2021 at 07:45 UTC ( [id://11130313]=note: print w/replies, xml ) Need Help??


in reply to Re: The Backslash Challenge
in thread The Backslash Challenge

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]

Replies are listed 'Best First'.
Re^3: The Backslash Challenge
by LanX (Saint) on Mar 25, 2021 at 11:05 UTC
    > 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://11130313]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 23:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found