Paul Johnson wrote:

use Scalar::Util "dualvar";

my $ns = dualvar 42, 'The Answer to Life, the Universe, and Everything';
printf("as number = '%d', as string = '%s'\n", $ns, $ns);

doh! I /knew/ there was a module that did that. I looked for it, but I just couldn't seem to find it.


--
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