Re: AW: mini-golf: first differing position

Yitzchak Scott-Thoennes <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Organization bs"d
Message-ID <[email protected]>
On Wed, Apr 21, 2004 at 09:44:54AM +0200, Xavier Noria <[email protected]> wrote:
> Good. With a little modification we get 26 if this is right:
>
>     $_=$x^$y;$n=$-[0]if/[^\0]/

$x = "abc"; $y = "abc\0\0\0"; gives undef instead of the required 3

On Wed, Apr 21, 2004 at 07:48:57AM +0200, Xavier Noria <[email protected]> wrote:
>
>     {$x ne$y&&$x=~/./sg&$y=~/\G$&/g&&redo;$n=$-[0]}

Needs a \Q after the \G. (Consider $x = "a.c" and $y = "abcdef" or
$x = "a+c" and $y = "a+cd".)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.