Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,i want to bring to hashes in a subroutine but subroutine doesn't recognize one of them.please help me.
sub versatility{ my(%genome1,%genome2)=@_; for my $key (keys %genome1) { my @genome1=$genome1{$key}=~ /(\d+)/g; my @genome2=$genome2{$key}=~ /(\d+)/g; my $m=($genome1[1]-$genome2[1]); my $n=($genome1[0]-$genome2[0]); if( $n==0){ print "number of occurance for $key in two genome are same\n";} else{ my $slope=$m/$n; print "domain versatility= $slope\n";} } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: two hashes in subroutin
by BrowserUk (Patriarch) on Aug 18, 2011 at 10:33 UTC | |
|
Re: two hashes in subroutin
by moritz (Cardinal) on Aug 18, 2011 at 10:18 UTC | |
by Anonymous Monk on Aug 18, 2011 at 10:32 UTC |