On Thu, Apr 24, 2003 at 08:42:32PM -0400, Casey West wrote: > http://rt.perl.org/rt2/Ticket/Display.html?id=7213 > --- 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 The problem is you're no longer demonstrating that the results of a hash slice is an lvalue. Maybe: foreach (@hash{qw/title subtitle/}) { (still not a great example) TonyThread Previous | Thread Next