Something like this perhaps:
--my @nums = qw(000001 000010 000100 001000 010000 100000); foreach (@nums) { s/^(0+)/' ' x length $1/e; print "|$_|\n"; }
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: Regex to zero suppress
by davorg
in thread Regex to zero suppress
by Theodorus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |