XP is just a number | |
PerlMonks |
pl – Perl One-Liner Magic Wand: looking for feedbackby Daniel Pfeiffer (Acolyte) |
on Jun 03, 2022 at 20:58 UTC ( [id://11144372]=CUFP: print w/replies, xml ) | Need Help?? |
One of my favourite Cool Uses for Perl have always been one-liners. But already decades ago I found them still too cumbersome. So, I rolled a wrapper, a better perl -E. When Corona went viral, I decided to publish it, after a major clean up. But I never advertised, beyond meta::cpan and Sourceforge. The base idea is a small script I can take to any server where I need to get stuff done. It's self-contained, as many data center hosts are firewalled off from the internet. It supports old Perls: With SuSE SLES 11 and 5.10 out of the way, it's now on 5.16, which comes with Red Hat RHEL 7. In hindsight, the added options are powerful, but the way I intertwined them into -n handling is ugly & limiting. Thus, I'm rewriting the wrapping code for pl 1.0. From that comes a small but rich template mechanism (interpolation or sprintf – meh.) That's just one of many goodies it contains, like the mighty multi-file key-based diff. There are a bunch of examples, many original: https://perl1liner.sourceforge.io May the veggie-burger menu guide you!
Back to
Cool Uses for Perl
|
|