develooper Front page | perl.perl5.porters | Postings from April 2003

[perl #7213] [PATCH] Updating example in perldata

Thread Next
From:
Casey West
Date:
April 24, 2003 17:38
Subject:
[perl #7213] [PATCH] Updating example in perldata
Message ID:
20030425004232.GK34510@geeknest.com
http://rt.perl.org/rt2/Ticket/Display.html?id=7213

Nearly two years later, Nicholas is right.  :-)

  Casey West

-- 
If you don't double-click me, I can't do anything. 
  -- John Aniston, on how computers have taken over his life

--- perl-current.orig/pod/perldata.pod  Mon Mar  4 04:18:27 2002
+++ perl-current/pod/perldata.pod       Thu Apr 24 20:35:56 2003
@@ -644,7 +644,7 @@
 
     foreach (@array[ 4 .. 10 ]) { s/peter/paul/ } 
 
-    foreach (@hash{keys %hash}) {
+    foreach (values %hash) {
         s/^\s+//;           # trim leading whitespace
         s/\s+$//;           # trim trailing whitespace
         s/(\w+)/\u\L$1/g;   # "titlecase" words

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About