0+$n works great for numbers, as mentioned already. Here's a more general solution:
$n =~ s/^\s+//;
In reply to Re: pack/unpack left padding
by ikegami
in thread pack/unpack left padding
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |