Peter Scott wrote:
> Have often wanted a way to tell whether a scalar was a number
> way to get at the SvIOK and SvNOK results would be great.
SvIOK, SvNOK and "is a number" are not the same thing at all.
Often numbers are strings that just look like numbers. Perl doesn't
eagerly convert stuff i
On Mon, Aug 07, 2000 at 03:35:25PM -0400, John Porter wrote:
> Hildo Biersma wrote:
> > Having said that, it doesn't need to live in the core - and even today
> > it should be relatively easy to write an XS module for this.
>
> It should no more NOT live in the core than, say, scalar() (or whatev
At 08:31 PM 8/7/00 +0100, Hildo Biersma wrote:
>Peter Scott wrote:
> >
> > Have often wanted a way to tell whether a scalar was a number, and rolling
> > a regex each time seemed wasteful given that Perl knew what it was
> > anyway. So a user-friendly way to get at the SvIOK and SvNOK results wou
Hildo Biersma wrote:
> Having said that, it doesn't need to live in the core - and even today
> it should be relatively easy to write an XS module for this.
It should no more NOT live in the core than, say, scalar() (or whatever
scalar() might become in 6).
--
John Porter
At 12:27 PM 8/7/00 -0700, Peter Scott wrote:
>Have often wanted a way to tell whether a scalar was a number, and rolling
>a regex each time seemed wasteful given that Perl knew what it was
>anyway. So a user-friendly way to get at the SvIOK and SvNOK results
>would be great.
The Sv?OK macros
Peter Scott wrote:
> Have often wanted a way to tell whether a scalar was a number, ...
> So a user-friendly way to get at the SvIOK and SvNOK results would
> be great.
This is one of those rare proposals which can safely be assumed to
be proposed, discussed, and accepted without dissent -- befo
Peter Scott wrote:
>
> Have often wanted a way to tell whether a scalar was a number, and rolling
> a regex each time seemed wasteful given that Perl knew what it was
> anyway. So a user-friendly way to get at the SvIOK and SvNOK results would
> be great.
>
> The pedestrian way would be a built
Have often wanted a way to tell whether a scalar was a number, and rolling
a regex each time seemed wasteful given that Perl knew what it was
anyway. So a user-friendly way to get at the SvIOK and SvNOK results would
be great.
The pedestrian way would be a builtin: isnum() or similar. But we