my @strings = qw( /home/usernames/doejohnwilson /home/usernames/doejanemary ); my $common = $strings[0] ^ $strings[1]; print substr $strings[0], 0, rindex($common,"\x00"); __END__
In reply to Re^2: Print left-anchored similarities between two strings
by Anonymous Monk
in thread Print left-anchored similarities between two strings
by miketosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |