sub label {
my $self = shift;
my $label = 'IP:'. ($self->ip_addr || 'Unknown');
- $label .= '", MAC:'. $self->mac_addr
+ $label .= ', MAC:'. $self->mac_addr
if $self->mac_addr;
$label .= ' ('. $self->description. ')'
if $self->description;
# remove delimiters
my $mac_addr = uc($self->get('mac_addr'));
- $mac_addr =~ s/[-: ]//g;
+ $mac_addr =~ s/[\W_]//g;
$self->set('mac_addr', $mac_addr);
my $error =