4 ms·
> What is the advantage of this over sed? The same as for anything that could be done in the shell, but is done with a full-fledged programming language: when
by JadeNB 10y ago
> What is the advantage of this over sed?
The same as for anything that could be done in the shell, but is done with a full-fledged programming language: when you discover you need to tweak it to accommodate an additional requirement, it's easy in Perl but hard in sed.
- nilved 10y agoIf that was the case you think you'd reach for literally any other language than Perl.
- untoreh 10y agoperl has the best regex, or one of the best, also it is the only other language other than python which is installed by default in common distros afaik
- aduitsis 10y agoIf you feel unproductive or uncomfortable with Perl, you should avoid it and use whatever language strikes your fancy. Many people however are extremely comfortable and productive with Perl, for a wide variety of reasons. It's really an awesome language that has proven its vast usefulness a long time ago.
- collyw 10y agoPerl is usually my goto language for that sort of task. It has loads of built in features for interacting with the system.