Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: no way it's not a bug of Perl

by choroba (Cardinal)
on Jul 14, 2024 at 23:06 UTC ( [id://11160606]=note: print w/replies, xml ) Need Help??


in reply to Re^4: no way it's not a bug of Perl
in thread I thought I found a bug of Perl

100% agree. At $job - 2, we spent several days tracking a bug caused by s/$regex/$replace/ where $regex got accidentally empty and the substitution started replacing unrelated parts of the data.

Besides /b or a feature, another way would be to introduce a new construct, e.g. (*LAST), which you can use similarly to (*SKIP) etc.

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://11160606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2024-09-11 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (13 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.