Keep It Simple, Stupid | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Why are you trying to confuse Perl by adding useless double quotes? If you drop these double quotes, it works as expected: my %h = map { $_ => $_ } @arr ;
I have noticed recently that more monks have shown this tendency to add (double) quotes where it is not necessary and I wonder where they may have picked-up such a strange idea? Is there a new "Perl for Beginners Tutorial" running loose somewhere? If so, we need to catch it and have it shot. CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James In reply to Re: strange map behavior
by CountZero
|
|