in reply to Re: processing key value pairs of a hash
in thread processing key value pairs of a hash
When I run this I get an error message stating that a#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %clone_hash; while (<DATA>) { chomp; my @fields = split /\t/; my ($gene_symbol, $esc_qc) = ($fields[0], $fields[1]); $clone_hash{$gene_symbol} = $esc_qc; my $grade = ($esc_qc =~ /^pass[1-3]$/) ? 'good' : 'bad'; $clone_hash{$key}{$grade}++; } print Dumper(\%clone_hash); _DATA_ 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik fail 4933402D24Rik pass1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: processing key value pairs of a hash
by lomSpace (Scribe) on Apr 15, 2009 at 16:20 UTC |