3 ms·
Is anyone like me and just uses Perl as a Bash replacement? If I need to write more than a 2 line script, I just use Perl.
by waynecochran 10y ago
Is anyone like me and just uses Perl as a Bash replacement? If I need to write more than a 2 line script, I just use Perl.
- ryl00 10y agoPerl is the reason my bash knowledge never grew beyond a rudimentary level...
- dozzie 10y agoI used to write many Perl tools for command line (I currently use Python because of team's tribal knowledge), though I make the choice between Perl/Python and shell looking not at the expected size, but at what kind of processing it is. Shell is an excellent tool when it comes to call external commands and generally working with files, and no other language makes it as easy.
- _delirium 10y agoReplacing bash+sed+awk is more or less why Perl was written initially (which also explains much of its syntax). I like it better than shell scripts mostly because the built-in data structures are a bit nicer. And I like Perl/PCRE regex syntax better than POSIX regex syntax.
- manyxcxi 10y agoI went the opposite way. I started out writing few liner bash scripts that just basically wrapped my perl script with proper environment vars, args, etc. and do all the heavy lifting in Perl. It also happens that my dad was a a build engineer back when they didn't really have a title for it and his Swiss Army knife was Perl. I literally learned coding beyond BASIC on HP-UX, Solaris, and Perl. At some point, I just started doing more and more in bash and started using Perl only specifically for anything I was having trouble getting working with sed+awk. As of today it's probably been 3+ years since I wrote anything in Perl, I'll just drop to Python if I need it now. Also my sed and awk skills have gotten better.