"Randy W. Sims" wrote:

> #!/usr/bin/perl
>
> package NumStr;

This makes sense to me.  As a package, it makes sense to have overloaded operations.
This is why I was asking if the value was really stored as a number.

> use strict;
>

...

> printf("as number = '%d', as string = '%s'\n", $ns, $ns);
>
> __END__
>
> You can simulate more closely with XS:
>
> #include "EXTERN.h"
> #include "perl.h"
> #include "XSUB.h"

Looks interesting, but I am not really familiar enough with XS to know what to make of
it.

I'll look at it again when I've had some time to check out the XS libraries.

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to