in reply to Handle MySQL BIT data type in Perl

If you are using anything SQL::Abstract based like Mojo::mysql and you are using ->insert(... %hash) then you could do something like:

[...] $new_user{REMOVED} = &mysqlBitField($data->{REMOVED}); [...] sub mysqlBitField($field){ return undef unless defined($field); return pack("b", 0) if $field == 0; return pack("b", 1); }

Thank you mable for the pack b idea!!