On 30 May 01, at 9:07, Jarkko Hietaniemi wrote:
> For example, work in pennies (1995) instead of dollars and cents
> -(19.95) and divide by 100 at the end.
> +(19.95) and divide by 100 at the end. In fact, if you are dividing by
> +100, you don't even need to really divide-- just split of the
s/split of/split off/;
> +fractional parts and insert the '.' (or whichever is your decimal
> +separator) in between, e.g.
> +
> + sub d100 {
> + $_[0] =~ /(.*?)(.(?:.)?)$/;
What's the difference between /(.(?:.)?)/ and /(..?)/ ? They both look
as if they mean "one or two non-newline characters, preferably two",
except the second looks cleaner to me. YMMV && TMTOWTDI, but I was
curious why you took the path you did.
Cheers,
Philip
--
Philip Newton <[EMAIL PROTECTED]>