in reply to Input Hash Values Into Subroutine
Hi, you assign to the variable each time through the loop, so it only ever holds one key. Just pass the value if it exists:
for my $found_key ( sort keys %hash1 ) { if ( exists $hash2{ $found_key } ) { ntSpacer( $hash2{ $found_key } ); } } sub ntSpacer { my $seq = shift; ... }
Hope this is all you were looking for ... I didn't check the sub (although it seems you are using the undefined value as a spacer)
|
|---|