good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You get this error because $type has a trailing newline character, which means that $type does not match any of your hash keys. You should chomp your input:
See Basic debugging checklist Tip #3. Update: I was surprised to see that lowercase stdin works just like uppercase STDIN. All the docs seem to just use uppercase for this special filehandle. Can some monk show me where this is documented? In reply to Re: printing hash values and keys from user (OT: stdin vs. STDIN)
by toolic
|
|