3 ms·
I usually use perl with a combination of cut, grep and sort. If I had awk and sed in muscle memory, I’d definitely use them in some places where I use perl (aw
by hedora 4y ago
I usually use perl with a combination of cut, grep and sort. If I had awk and sed in muscle memory, I’d definitely use them in some places where I use perl (awk and sed require fewer keystrokes for certain tasks).
I also like using perl for non-trivial stuff. For instance: parse a file, stick stuff in a hashtable or two, then iterate over the keys in sorted order, check a bunch of invariants, and then emit some other wonky format by chasing keys in the hashtables.
Some day, I hope to master the techniques in this book:
https://en.wikipedia.org/wiki/The_AWK_Programming_Language https://en.wikipedia.org/wiki/The_AWK_Programming_Language
which includes an RDBMS and assembler + interpreter, and then culminates in a 4 page section that implements make.
At that point, I might be able to switch away from perl.