in reply to Help me decipher code containing map function
What BrowserUk said. And if for some reason you really want the address in two-byte groups:
c:\@Work\Perl\monks>perl -wMstrict -le "my $octetstr = qq{\xab\xcd\x00\x1d\x94\x56}; ;; my $mac = join '.', unpack '(H4)*', $octetstr; print qq{'$mac'}; " 'abcd.001d.9456'
Update:
Why do i get an error when I start my code like "map { my $val .=" instead of declaring $val separately.Because if your code were
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Help me decipher code containing map function
by adamZ88 (Beadle) on May 23, 2017 at 14:36 UTC |