D
doni
I am trying to search and compare a given mac address with a list of
mac addresses from a file. All the MAC address values are listed in the
first field of each line.
I have tried all the combinations for comparison operation but I am not
getting the desired result.
Here are the ones that I tried where $match variable contains the given
mac address. The MAC address is available in this format:
xx:xx:xx:xx:xx:xx
1. if ($words[0] eq $match)
2. if ($words[0] =~ m/\x$match/)
3. if ($words[0] =~ m/^[$match]/)
Can anyone let me know how should I do this.
Thanks,
sekar
mac addresses from a file. All the MAC address values are listed in the
first field of each line.
I have tried all the combinations for comparison operation but I am not
getting the desired result.
Here are the ones that I tried where $match variable contains the given
mac address. The MAC address is available in this format:
xx:xx:xx:xx:xx:xx
1. if ($words[0] eq $match)
2. if ($words[0] =~ m/\x$match/)
3. if ($words[0] =~ m/^[$match]/)
Can anyone let me know how should I do this.
Thanks,
sekar