in reply to Hashref for specific values
I strongly agree that you probably do not want to try to write it “all on one line.” Doing so makes no difference to the Perl compiler, but it makes the code considerably harder to maintain going forward. When you meditate on, “how shall I write this?”, remember that the code may next be touched by a complete stranger (which might be you) who’s under pressure and in a hurry. She will need to instantly ascertain what your code actually does, and then she will need to accurately write a source-code patch that will make the code do something new. “Perl Golf” is fun to write, but not fun to encounter in the field. Little things make a big difference.
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hashref for specific values
by raybies (Chaplain) on Mar 04, 2011 at 15:21 UTC |