open(KISMET,"/tmp/kismet_dump") or die "$!"; binmode KISMET; $/ = \64; # example: IF the record length is 64 bytes while () { my @raw = unpack $packformat, $_; ... }