in reply to Regex to zero suppress

Something like this perhaps:

my @nums = qw(000001 000010 000100 001000 010000 100000); foreach (@nums) { s/^(0+)/' ' x length $1/e; print "|$_|\n"; }
--
<http://www.dave.org.uk>

"Perl makes the fun jobs fun
and the boring jobs bearable" - me