Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Comparison by position and value

by ambrus (Abbot)
on Jan 02, 2005 at 11:08 UTC ( [id://418771]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub compatible { 
        my ($s1, $s2) = @_; 
    ...
        !(($s1 | $s2)=~y/\0//); 
    } 
    print(compatible("_8__3__19", "48_____7_") ? "true\n" : "false\n");
    
  2. or download this
    sub compatible {
        y/_/\477/c, y/_/\0/ for my @m = @_;
    ...
            for [ qw[ _8__3__19 48____7__ ] ],  # compat
                    [ qw[ _8__3__19 4_8___7__ ] ],  # compat
                    [ qw[ _8__3__19 48_____7_ ] ];  # clash
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-18 16:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found