in reply to Re: Re: input record separator help
in thread input record separator help
Cheers - L~R#!/usr/bin/perl use strict; use warnings; my $file = $ARGV[0] || 'default'; open (DNA, '<', $file) or die "Unable to open $file for reading : $!"; my %seq; while ( <DNA> ) { my $dna = <DNA>; my $pairs = "a2" x ((length $dna) / 2); $seq{$_}++ for unpack $pairs , $dna; } print "$_ : $seq{$_}\n" for keys %seq;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: input record separator help
by Anonymous Monk on Mar 15, 2004 at 15:00 UTC | |
by Limbic~Region (Chancellor) on Mar 15, 2004 at 15:11 UTC |