On Apr 11, Prakash Kailasa said: >On Thu, Apr 11, 2002 at 08:06:14AM -0700, Paul Makepeace wrote: >> The task is to find the first differing character given two strings. >> There is one obvious solution walking along using substr, > >($a^$b)=~y/\0//
That isn't helpful, though -- that merely gives a count of how many characters were the same between the two. We need the position of the first difference. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ]
