Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Quicker way to compare these 2 strings?

by TimToady (Parson)
on May 19, 2010 at 00:57 UTC ( #840593=note: print w/replies, xml ) Need Help??


in reply to Quicker way to compare these 2 strings?

$matches = ($first ^ $second) =~ tr/\0//;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://840593]
help
Chatterbox?
[choroba]: erix you there? I have a Pg question...
[erix]: yeah... trepidation
Corion quivers with antici...
[choroba]: if you turn off autocommit and run a prepared statement which fails, the transaction is automatically rolled back, at least in DBD::Pg
[erix]: at least, I'll know where to find the documentation :P
[choroba]: but if there's no prepared statement, there's no rollback
[choroba]: the rollback happens when deallocating the prepared statement in error state.
[choroba]: is this something that Pg enforces, or just a consequence of the Perl implementation?

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-09-19 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (220 votes). Check out past polls.

    Notices?