[Israel.pm] regex substitue with lookup table

Yuval Yaari yuval at windax.com
Sun Mar 28 03:05:54 PST 2004

Offer Kaye wrote:

>But frankly in this case I personally would go for the longer way- it's
>simply more readable.
A bit off the original topic... But I would have to agree with Offer.
Perl makes it easy for you to write unreadable code. People always tell 
me that Perl code is unreadable, etc.
Try and extend the code that Offer suggested (adding another test (if 
statement), or whatever)... Let someone from your company try and change 
it (or understand it)...
You see the point.

I love these little hacks in Perl and I can't say I don't use them, but 
when working on code for my company I use the KISS (keep it simple, 
stupid) concept.
I don't give up speed/performance, speed of coding (esp. since I don't 
need to comment obvious things), I waste a bit more HDD space, and the 
next programmer to read my code won't curse me for hours...

Anyway, making the code shorter wouldn't usually help unless you want to 
show the tie-wearing-people how much of a Perl hacker you are :)

Just my .02...


More information about the Perl mailing list