in reply to Re: Re: Re: input record separator help
in thread input record separator help

hi L~R, thankyou for your help, would you mind exaplaining to me exactly what the code does? e.g. the 'a2' and 'unpack' bits? many thanks
  • Comment on Re: Re: Re: Re: input record separator help

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: input record separator help
by Limbic~Region (Chancellor) on Mar 15, 2004 at 15:11 UTC
    Anonymous Monk,
    You can check out the pack/unpack tutorial for more information, but here was my logic.
    my $pairs = "a2" x ((length $dna)/2); # The x operator (perldoc perlop) repeats LHS string times the RHS $seq{$_}++ for unpack $pairs, $dna; # Break string up into a list of 2 char strings # Increment the corresponding hash value by 1
    Cheers - L~R