in reply to Re: Adding Leading Zeros
in thread Adding Leading Zeros
Oh! You must mean some like this:
Small doubt about efficiency remains however.my @inputs = (20188, 18350, 4005, 127736, 10291, 4937, 57500, 150494); sub with_zeroes { grep( $_ == $_[0], '0000000000' .. '9999999999' ) } say with_zeroes($_) for @inputs;
|
|---|