mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   PrimeNet (https://www.mersenneforum.org/forumdisplay.php?f=11)
-   -   Quick Question about assignments (https://www.mersenneforum.org/showthread.php?t=16104)

Mr. P-1 2011-11-17 11:50

[QUOTE=Christenson;278871]:blush:Perhaps it is time I learned awk...but what I would say of perl is:
1) It is a GENERAL tool. I'd argue that unless the user has a lot of work to do that the specific tool is really good at, the general tool is better. This is not the case here; this is a one-off that will soon be forgotten when the task is over.[/quote]

If you have both tools, and are equally adept at using both, then you would naturally choose to tool best suited for the job at hand, regardless of whether you have a lot of similar work or not.

If you only have the general tool, it might be worth acquiring the specific tool if you did have a lot of work that it's really good at. If you only have the specific tool, it might be worth acquiring the general tool if you had even a little work the specific tool was not good at.

[quote]2) Perl is designed as a conscious attempt to minimise the amount of programming effort for one-off problems.[/quote]

Indeed. Larry Wall [url=http://dev.perl.org/perl6/talks/2000/als/larry-als.txt]said[/url] there was a subset of perl that looks like AWK.

[quote]3) If sed can do it, perl has a "sed" mode.[/quote]

I use sed for simple substitutions. I know it can do more than that, but I've never bothered to learn.

[quote]Anyone know what I should look at on the net besides "man awk"?[/QUOTE]

dunno. I just use GAWK info.


All times are UTC. The time now is 01:23.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.