use List::Util qw( reduce ); my $token = pack 'NN', time, $employee_id; $token .= reduce { $a ^ $b } split //, $token;
Use "V" instead of "N" if you need the opposite byte order.
In reply to Re^2: packing into a byte token
by ikegami
in thread packing into a byte token
by dulac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |