Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^6: 5.42: Does m// toss a string around?

by Anonymous Monk
on Jan 30, 2026 at 22:37 UTC ( [id://11167279]=note: print w/replies, xml ) Need Help??


in reply to Re^5: 5.42: Does m// toss a string around?
in thread 5.42: Does m// toss a string around?

COW is normally used for the copy for $& and friends, but it wasn't used in this case because there's not enough space in the buffer

Thanks. I think it follows that appending a character practically poisons a string in Perl (try 1e7 if on modern PC):

$ time perl -e '$_ = "a" x 1e6; $_ .= "a"; 1 while /./g' real 0m35.868s user 0m35.857s sys 0m0.008s

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2026-04-10 08:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.