Richard Heintze said:
> Why does this program print "yes def" but not "yes
> xyz"? It does print "xyz:def", so I don't understand
> why it does not print "yes xyz".
>
> {
> my %x = ( xyx => 'abc', d => 'y', f => 'g' );
Presumably because the key you specified is xyx, not xyz.
> $x{"def"} = "fhi";
> print qq($_ : ).$x{$_}.qq(\n) foreach (keys %x);
> foreach (keys %x) { print "yes xyz\n" if ($_ =~
> "xyz"); }
> foreach (keys %x) { print "yes def\n" if ($_ =~
> "def"); }
> print $x{'xyz'}."\n";
> }
--
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]