my $ctr; print map { ++$ctr % 8 ? "$_, " : "$_\n" } map { sprintf('0x%04x', $_) } unpack('v*', $line);