p{maxlen} is a string, needs to be converted to int before bitwise and.
Code near line 187 should be:
if ($$p{maxlen}) { if ( $proto eq 'ip' ) { printf " match u16 0x0000 %#.4x at 2", 0xffff & ~int($$p{maxlen}); } elsif ( $proto eq 'ipv6' ) { printf " match u16 0x0000 %#.4x at 4", 0xffff & ~int($$p{maxlen}); } }