#!/usr/bin/perl ########################################### # Mike Schilli, 2006 (m@perlmeister.com) ########################################### use strict; use warnings; use WatchLAN; my $db = WatchLAN->new(); while() { if(/^#\s+(.*)/) { my $name = $1; my $nextline = ; chomp $nextline; my($mac, $ip, $ip_change) = split ' ', $nextline; $db->device_add($name, $mac); } } __DATA__ # Slimbox 00:04:20:03:00:0d 192.168.0.74 ip_change # Laptop Wireless 00:16:6f:8d:58:db 192.168.0.75 ip_change # Laptop Wired 00:15:60:c3:44:10 192.168.0.71 ip_change # Mike's Linux Box 00:11:11:5b:ed:46 192.168.0.18 ...