Re: Help! Strings -> Numbers
[email protected] (Dave Storrs) Thu, 21 Nov 2002 00:41:02 -0800
| Newsgroups | perl.perl6.documentation |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Nov 21, 2002 at 03:26:09AM -0500, Tanton Gibbs wrote:
> Dave Storrs wrote
> > best solution. I just wish there were some way to get away from those
> > dratted sprintf format strings.
>
> Well, for the general case, you could create convienence functions that
> handle getting the correct format
>
> sub hex { return "%x"; }
>
> print "\$i is $i.as($(hex))"
> [snip]
Hmm...good suggestion; that does make me rather happier.
Thanks!
--Dks