baxy77bax has asked for the wisdom of the Perl Monks concerning the following question:

hi,
this is a "bit" embarrassing since I've done it few times but cannot find out where exactly and how: so i have (or am suppose to have ) a vector inside a hash like this(Dumper output):
'chr19' => [ [ '1', bless( do{\(my $o = 11148428)}, 'Bit::Vector' + ) ] ]
the question now is how to print it in binary form as it is. because vector replaces an array of 1's and 0's , it is not a meaningful number
thnx

Replies are listed 'Best First'.
Re: Bit::Vector help printing the vector
by Somni (Friar) on Jul 07, 2011 at 19:09 UTC
    I'm guessing you want ->to_Bin, as in:

    say $h{'chr19'}[1]->to_Bin;

    I hope you're not trying to reconstitute a Bit::Vector object from a Data::Dumper dump, as it won't work properly. Bit::Vector does support Storable, however.