>>>>> "PP" == Philip Potter <philip.g.pot...@gmail.com> writes:

  PP> On 12 March 2010 09:17, Uri Guttman <u...@stemsystems.com> wrote:
  >>>>>>> "PP" == Philip Potter <philip.g.pot...@gmail.com> writes:
  >>  PP> 
http://stackoverflow.com/questions/2431032/how-to-print-a-key-value-using-the-perl-hases/2431139#2431139

  >> you shouldn't be learning perl from that site!

  PP> I respectfully disagree.

  >> perl -E 'say while <keys %hash>'
  PP> keys
  PP> %hash

  PP> So keys %hash is being treated as a string, not an expression, the
  PP> keys function never gets called, and the loop executes twice, once
  PP> with $_ = 'keys' and once with $_ = '%hash'. Truly horrible!

so you disagree with it being a bad site to learn from, but you finally
realize this posting was horrible! in that one set of posts in this
thread only a couple were reasonable. several didn't even properly
address the question directly (he had a 2 or 3 level deep hash and just
keys/values won't cut it). others partially answered. no one pointed the
OP to perllol, perldsc, perlreftut which cover that topic well. this is
not what i call an educational site.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to