On Fri, Oct 23, 2026 at 01:25:01AM -0400, Michael Galea via Talk wrote:
Alack and alas, I still like perl better than python though I code in each.
I have some perl programs that I want to pass on to my son, who knows python but not perl. So I converted the perl to python. Here are the line counts and the character counts for each: wc -l taxcalc.* 1305 taxcalc.pl 2157 taxcalc.py
ls -la taxcalc.* 64340 Sep 27 18:52 taxcalc.pl 77980 Sep 28 00:32 taxcalc.py
time taxcalc.pl .... 1>/dev/null; real 0m0.070s time taxcalc.pl .... 1>/dev/null; real 0m0.073s
The code implements the Federal/Ontario tax code, and I verify both programs output against the other, to the character, of output
In truth, I don't find the python much easier to understand or code for, although I have to admit I am more proficient in perl than in python. In perl I do 'print "index $index \n"; in python I do `print(f"index {index}")` Which seems more straightforwards to you?
I didn't like that print wasn't treated like a function in python 2.x. 3.x fixed that so it must be print(...). And I would use print("index %s" % (index)) because I guess I am still a C programmer at heart. -- Len Sorensen