Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Help me decipher code containing map functionby AnomalousMonk (Archbishop) |
on May 23, 2017 at 17:09 UTC ( [id://1191001]=note: print w/replies, xml ) | Need Help?? |
I will take the liberty of answering for BrowserUk. I'm not sure what $packed1 and $packed2 are supposed to represent. If $packed1 is the original, raw MAC address and $packed2 is the reformatted address (with bytes represented as hex-digit pairs and with dots thrown in for good measure), then no, they cannot be directly compared: (The two strings would have to be converted to a common format for comparison.) If $packed1 and $packed2 are both reformatted MAC addresses (and they've both been reformatted according to the same scheme), then yes, they can be directly compared for equality. Incidentally, this is another question that's open to resolution by direct experimentation. Could you not have written a couple of short routines to answer your own question — plus some variations? Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|