4 ms·
I think this article has convinced me that I should learn Perl. Looks bloody useful for shell scripts, indeed ("a better awk" is the phrasing I've heard).
by devinj 16y ago
I think this article has convinced me that I should learn Perl. Looks bloody useful for shell scripts, indeed ("a better awk" is the phrasing I've heard).
- someone_here 16y agoIt's kind of like a gateway drug once you find out about CPAN ;)
- sreque 16y agoNo one will argue with you that Perl isn't better than awk, if that's the bar you've set for yourself for picking a new language to learn.
- zrail 16y agoI use perl every day and awk almost every day. Awk is useful for commands where it forms a small part of an overall pipeline and needs to be somewhat terse, and yet fast. Gawk is actually fairly fast, mawk[1] even more so. [1]: http://invisible-island.net/mawk/mawk.html http://invisible-island.net/mawk/mawk.html
- devinj 16y agoWell, there are languages I learn to improve my mind, and to improve my craft. As far as the mind goes, perl is nothing new (on the mind to-learn list: Haskell, OCaml, Eiffel, Erlang). Craftwise, it looks very useful.
- wazoox 16y agoIt's definitely better than shell for quick file processing :) Check out this fantastic cut replacement (thanks to mjd): #!/usr/bin/perl my $field = shift or usage(); $field -= 1 if $field > 0; while (<>) { chomp; my @f = split; print $f[$field], "\n"; } sub usage { print STDERR "$0 fieldnumber\n"; exit 1; }