Re:Zx 3.0
by qalmakka on Monday August 16, 2021 @06:23AM
(#28196577)
That's why Perl is my go-to choice for glue scripts. It's almost always installed by default, it has stayed consistent for decades without any breaking changes, its regex support is by far the best around, and its almost as good as the shell at gluing commands together.
[ Parent
| on HN ]
Re:Zx 3.0
by nyanpasu64 on Monday August 16, 2021 @07:01AM
(#28196771)
I'm less likely to have Perl installed than Python on Windows, where I sometimes want my scripts to run as well.
It's also unlikely you have Python installed on Windows though, and there's a non-insignificant change that's an old or random version (probably even Python 2). You can't rely on anything on Windows, so you're definitely going to also install a runtime from Chocolatey or similar.
Re:Zx 3.0
by thatwasunusual on Monday August 16, 2021 @09:52AM
(#28198064)
> That's why Perl is my go-to choice for glue scripts. It's almost always installed by default
My first thought was related to this as well: Perl is _always_ installed, and based on Python's popularity (compared to Perl, at least), I'd assume that Python also was installed by default?
That's an honest question, btw: I use Perl quite a lot, Python not so much (at all). :)
Assuming Python or Perl are installed by default in any server is an invite to a world of pain. At least that's my anecdotal experience.
I've seen instances of some Unix systems not having Perl installed, but that's very rare. Basically everything directly or indirectly depends on Perl, so you really have to run your scripts on a minimal install of RHEL of FreeBSD with 0 ports in order to get into such a situation.
And for that situation you can always break out http://p3rl.org/App::staticperl.
Plus of course if you want to use (pure perl) cpan dependencies I wrote http://p3rl.org/App::FatPacker and http://p3rl.org/Object::Remote to make that easier.
Re:Zx 3.0
by thatwasunusual on Monday August 16, 2021 @10:50PM
(#28205637)
> And for that situation you can always break out http://p3rl.org/App::staticperl.
Why do you link to p3rl.org? And, more importantly, why do you link to something that doesn't exist?
Many container base images won't have perl by default (e.g: alpine).
For servers it's less common, but enterprise systems never cease to amuse me.
Most container base images are often so barebone you can't really count on them containing anything. For instance, on an Alpine image you can't count on bash.