Ed Chester wrote:
>
> > sub d2h16 {
> > sprintf "%04.4X", shift;
> > }
>
> I don't believe it. That's amazing. That's not "off-beam",
> that's "nail on the head". Is there a way of returning that
> as a value instead of printing it?
>
> ed, not worthy.
Quite as worthy as I! But be careful with your boundary values
if they matter. I don't know what your app is, but leave it as
a sub if you can: Perl's excellent at in-line optimisation
d2h16 answers with the value, so you can
my $answer = d2h16 31254;
It's the language that's cute: not me. Thank Larry!
Rob
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs