According to the pod for the module, $read->cigar_array returns a reference to an array of arrays. You could print it with Data::Dumper to see its structure. You can dereference it to get at the top array like this: @{$read->cigar_array} . Then you can loop through that array of references, and dereference those to access those subarrays:
for my $toparray (@{$read->cigar_array}){ my( $operation, $count ) = @{$toparray}; # do stuff with this CIGAR operation and count }
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re: cigar string
by aaron_baugher
in thread cigar string
by prbndr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |