in reply to calling a hash

General purpose hint that may help you a lot:
use strict; use warnings;
I have array which stores names given from on screen prompt, then want to print the values for these names
<div mode="esp">
This suggests me you may have simply forgotten to chomp your entries. Does this ring a bell?
</div>

Replies are listed 'Best First'.
Re^2: calling a hash
by Anonymous Monk on Oct 04, 2005 at 11:28 UTC
    foreach (@array) {chomp; print "\n $_\n"; #sucessful print $value = $glycan_type{"$_"}; print "value: $value\n"; #nothing returned };
      Are you the same AM that wrote the root node? If so, then what are you trying to say? That the problem appears not to be a spurious "\n"? Well, in any case the form of my reply should have implied that IMNSHO you didn't give us enough elements.

      So I suggest you should give us more info, possibly preparing a minimal example still exhibiting the problem. Chances are that while doing so you will find an answer yourself. Otherwise you will help us to help you, which is fine, isn't it?

      Incidentally, re

      $value = $glycan_type{"$_"};
      no need to put $_ in quotes.