From the result I realized that I do not fully understand vec and maybe also pack/unpack#! /usr/bin/perl use strict ; use warnings ; my $bitstring = "" ; my $offset = 0 ; for my $i (0..20) { vec( $bitstring, $offset++, 4 ) = $i ; } my $bits = unpack("A4*", $bitstring); print "$bits\n" ;
In reply to HowTo unpack a vec (bitstring) by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |