> >      my int $i is formatted('%4x');
> >      $i = 255;
> >      print $i;    # prints '00ff';
> >
> > Anyone care to comment?
>
> I too don't see much use in the former. The latter puts distance between
> the formatting and the thing being formatted and that can't be good.

In situations such as these where you want a variable printed in a special
way, wouldn't it be better to use printf?  Isn't that what it was designed
for?

Tanton

Reply via email to