>>>>> "IP" == Ian Phillipps <[EMAIL PROTECTED]> writes:
IP> On Thu, 18 Oct 2001 at 20:43:40 -0400, Uri Guttman wrote:
>> >>>>> "IP" == Ian Phillipps <[EMAIL PROTECTED]> writes:
IP> I feel sure this is a FAQ...
>> trust your feelings. i didn't answer because it IS an FAQ. FAQ's aren't
>> fun. :)
IP> Oh, I don't know. My solution is a few strokes better than the FAQ's :-)
i didn't check yours for accuracy. it is a tricky regex as it must check
for only 1 decimal point and 1 or 2 digit strings around it. i once
wrote one that was a regex with 2 checks against $1 and $2. mine didn't
use lookahead which is why i needed the extra logic.
IP> But even though I was too tired to read straight, I could still
IP> debug regexs. Should I be worried?
nope.
IP> On a philosophical note, the suggestions involving asking perl via
IP> $SIG{__WARN__} are closer to the mark IMO. The most useful definition is,
IP> after all, "will perl convert this to a numerical format without
IP> complaint?". After all, something that looks like "1+2i" is a number if
IP> it happens to be a Math::Complex object.
$SIG{__WARN__} is too annoying to setup IMO. you might as well use the
POSIX calls to do the same work and get a direct answer.
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Search or Offer Perl Jobs -------------------------- http://jobs.perl.org