On Wed, Jul 8, 2009 at 10:16, Steve Bertrand<st...@ibctech.ca> wrote: snip > I agree, and just before you mailed, I did figure out that I needed a > placeholder, by using your recommended 'w' command in the debugger. It's > a tiny bit different than your approach, but it works ;) > > %hash = map { my $x = $_; $_ =~ s/h_/hello_/;$_, $hash{$x} } keys %hash; snip
The following bits of advice are stylistic in nature, so you can ignore them, but there really are good reasons not to. As name, $x does not really mean anything in this context. A better name is $k for key, especially if you use $k often to mean key. The fat comma (=>) is better than the normal comma in this case. They will function the same way, but the fat comma makes it clear that there is a key/value pair being created. -- Chas. Owens wonkden.net The most important skill a programmer can have is the ability to read. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/