> -----Original Message----- > From: AMORE,JUAN (HP-Roseville,ex1) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, November 13, 2001 10:58 PM > To: Beginners@Perl. Org (E-mail) > Subject: Trying to use the => notation to print the values from this > hash > > > Hello Perl Gurus, > I'm trying to print anyone of these values using the => notation. > I believe I can use => but not so sure how to use it. > Can someone give me an example,...I tried different ways but > have exhausted > all means. > Any hints....:) > > Many Thanks! > > %Unix= ("SHELL" => "/bin/csh", > "PAGER" => "more", > "DB" => "mysql"); > > print "Value: ,=> $unix{SHELL}\n"; ^ This is captial U above
=> as an operator is essentially just a comma, with the added feature that you don't have to quote a word to the left of it. So the following are equivalent: "SHELL", "/bin/csh" SHELL => "/bin/csh" I'm not sure what you mean by "print using the => notation". Do you want the characters => to print? Then what you are doing is fine, if you use the right variable name: print "Value: => $Unix{SHELL}\n"; In this case => are just characters in a quoted string, not an operator. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]