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

Re^2: How to campare two variable consist line and print difference

by GrandFather (Saint)
on Sep 15, 2014 at 09:19 UTC ( [id://1100571]=note: print w/replies, xml ) Need Help??


in reply to Re: How to campare two variable consist line and print difference
in thread How to campare two variable consist line and print difference

Consider:

my $str1 = "The device doesn't allow writes and that's causing this is +sue."; my $str2 = "The device allow writes and that's causing this issue."; my $str3 = $str1 ^ $str2; print "Difference found at $+[0]\n" if $str3 =~ /^(\0+)/;
Perl is the programming world's equivalent of English
  • Comment on Re^2: How to campare two variable consist line and print difference
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-25 07:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found