in reply to Simple CLI calculator based on Perl's eval()

I've been using the following on Windows for years (I named it "pc.bat"). Note: For typing convenience I replace 'x' with '*' for multiplication and perform addition on two or more numbers by separating them with spaces. I do not enter spaces around operators ('*', '/', etc.).

Examples: pc 2x4 (Total = 8) pc 1 2 (Total = 3)

@echo off perl -MInteger -e "s/x/*/g for @ARGV;print qq(Total = ), eval join(qq( ++),@ARGV), qq(\n)" %*

"It's not how hard you work, it's how much you get done."