pack is meant for creating C structs, not for formatting. Try printf/sprintf:
$formatted = sprintf('%5s', 'abc'); # ' abc' $formatted = sprintf('%-5s', 'abc'); # 'abc '
You could always pack what sprintf returns, if you need pack.
In reply to Re: Right justifying text in a template field
by ikegami
in thread Right justifying text in a template field
by olecs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |