my $template = 'vvV'; read $client, my $sync_packet, 8 or die "Couldn't read from client: $!"; my ($syncHeader, $syncID, $unitID) = unpack $template, $sync_packet; ...