use warnings; use strict; for (qw(00ab 005 5 000 0)) { my $nz = sprintf '%x', hex; print "$_ ---> $nz\n"; } __END__ 00ab ---> ab 005 ---> 5 5 ---> 5 000 ---> 0 0 ---> 0
In reply to Re: RegEx to remove leading zeros from a hex number
by toolic
in thread RegEx to remove leading zeros from a hex number
by Karger78
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |