in reply to Re^2: Arithmetic with fractions
in thread Arithmetic with fractions
a) eval does not throw exceptions. (Quite the opposite.) Given those strings, undef will be returned, which sounds perfectly acceptable. It should also return undef when validation fails, but it doesn't.
b) While this function returning a number in 0..99 doesn't sound dangerous, I have to figure how this happens.
c) Shouldn't you be asking: Is it possible to make THAT regexp take forever? After all, the user isn't providing the regexp. If that simple regexp can take forever, Perl is in big trouble, not just this program.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Arithmetic with fractions
by calin (Deacon) on Sep 22, 2004 at 17:51 UTC |