Using:
my $foo = "0:0A:0C:B:B8:F"; $foo =~ s/([0-9A-F])+:?/length($1) < 2?"0$1":$1/ge;
Yields 000A0C0B080F instead of 000A0C0BB80F. I don't understand why it produces that. From what I understand, which is obviously incorrect, it should work.
Any ideas why it doesn't work?
Thanks,
HiFoo
In reply to Re: Re: Converting MAC Address
by HiFoo
in thread Converting MAC Address
by HiFoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |