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

Re: Comparison by position and value

by aquarium (Curate)
on Jan 02, 2005 at 10:23 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2023-10-04 20:43 GMT
Find Nodes?
    Voting Booth?

    No recent polls found