* Bernie Cosell <[EMAIL PROTECTED]> [2004-04-22 00:02]:
> On 21 Apr 2004 at 22:55, A. Pagaltzis wrote:
> > If you do this by looking at $amt, then your method must be
> > mathematical, because chopping characters in the string
> > representation of the unrounded $amt might occasionally lead to
> >
On 21 Apr 2004 at 22:55, A. Pagaltzis wrote:
> * John Douglas Porter <[EMAIL PROTECTED]> [2004-04-20 08:39]:
> > It seems to me that the precision desired should depend on
> > context, and nothing else. And that being the case...
> >
> > printf $fractional_cents ? '%7.3f' : '%7.sf', $amt;
> >
* Uri Guttman <[EMAIL PROTECTED]> [2004-04-20 08:07]:
> and no one found one of the faster methods:
>
> my $padded = substr( $in . $c x $pad_len, 0, $pad_len ) ;
I did. Unfortunately, I misread the spec and thought it would be
a problem that it also chops an $in longer than $pad_len down to
$pad_
* John Douglas Porter <[EMAIL PROTECTED]> [2004-04-20 08:39]:
> It seems to me that the precision desired should depend on
> context, and nothing else. And that being the case...
>
> printf $fractional_cents ? '%7.3f' : '%7.sf', $amt;
>
> irrespective of the value of $amt. Why is this not rig
On Apr 21, 2004, at 10:27, Xavier Noria wrote:
Sure thank you, then looks like
{$x ne$y&&$x=~/./sg&$y=~/\G\Q$&/g&&redo;$n=$-[0]}
is the shortest solution so far (49).
Just for the record, using the trick in the last post by Terje we get
48:
{$x ne$y&&$x=~/./sg&$y=~/\G\Q$&/g&&redo;($n)[
On Wed, Apr 21, 2004 at 07:37:42AM -0700, Yitzchak Scott-Thoennes <[EMAIL PROTECTED]>
wrote:
> On Wed, 21 Apr 2004, Bernie Cosell wrote:
>
> > I'm not sure if this is 'fun', but it might be at least curious: I don't
> > have a UTF-8 system handy to try, but I'm wondering: what happens with
> > th
On Wed, 21 Apr 2004, Bernie Cosell wrote:
> I'm not sure if this is 'fun', but it might be at least curious: I don't
> have a UTF-8 system handy to try, but I'm wondering: what happens with
> the string-xor operator on UTF-8 strings. It obviously cannot work byte-
> by-byte, but it seems like it
I'm not sure if this is 'fun', but it might be at least curious: I don't
have a UTF-8 system handy to try, but I'm wondering: what happens with
the string-xor operator on UTF-8 strings. It obviously cannot work byte-
by-byte, but it seems like it is going to be a bit tricky figuring out
what yo
and even 24
$_=$x^$y;($n)[EMAIL PROTECTED]/^\0+/
($n)[EMAIL PROTECTED]($x^$y)=~/^\0*/
Terje
> -Original Message-
> From: Winter Christian [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 21, 2004 10:09 AM
> To: [EMAIL PROTECTED]
> Subject: AW: AW: mini-golf: first differing position
>
On Apr 21, 2004, at 10:04, Yitzchak Scott-Thoennes wrote:
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 require
Xavier Noria wrote:
>
> On Apr 21, 2004, at 8:40, Winter Christian wrote:
>
> Good. With a little modification we get 26 if this is right:
>
> $_=$x^$y;$n=$-[0]if/[^\0]/
or even get a 25:
$_=$x^$y;($n)[EMAIL PROTECTED]/[^\0]/
-Christian
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
On Apr 21, 2004, at 8:40, Winter Christian wrote:
No, this one also counts similarities after the first differing
character.
$x = "abcfff"; $y = "abcggg";
correctly gives 3, but just try out
$x = "abcfff"; $y = "abcgff";
which gives you 5 because of the matching "f"s.
This way it should work:
$_
13 matches
Mail list logo