Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Comparison by position and value

by aquarium (Curate)
on Jan 02, 2005 at 10:23 UTC ( [id://418763]=note: print w/replies, xml ) Need Help??


in reply to Comparison by position and value

pseudocode: make each of the pair of strings an array step through first array, each position you find a underscore, put the underscore in the second array in same position. now step through second array, and in each position you find a underscore, put one at the same position in first array. join each array into a scalar and compare both scalars with string comparison operator (eq) the initial traversing of both arrays can be easily done in one loop. i just wrote it the (2 loop) way to more clearly illustrate.
the hardest line to type correctly is: stty erase ^H

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 15:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found