[ Context: Programming ]
Wrote a
Perl script after a while. Whoops! Had to look up perldoc and google to quickly gather examples of different things I was trying to do. Didn't take much time apart from that taken up by lookup itself.
The code in the script looks like this right now:
} elsif ($ln=~m/^!\s+(#\S+)\s+\d+\s+(\w+)/) {
Now, it needs to be commented and cleaned up so anyone, not necessarily experienced with Perl, can understand the logic with a glance.
I am using constructs like
(scalar keys %bag)
instead of the other shorter forms possible, because to me it looked more descriptive of the intent of the programmer.
For almost all of the Perl examples I was looking at, the authors hadn't felt it was necessary to add comments (the beauty of Perl?) ;-)