#!/usr/bin/perl my $name = "tasklist"; my $nodename = "pve"; my $bindata = pack "Z[256]Z[256]", $name, ($nodename || ""); printf("$bindata\n")