This way you can put GolfScore.pl (what I called it) into your path, work on your golf games in a temp directory and know for sure that you're scoring what you're running.package GOLF; use strict; my $code = join '', <>; $code =~ s/^\s+|\s+$//gm; $code =~ s/\n//g; $code =~ s/}$//; $code =~ s/^sub\s+(\w+)\s*{//; printf "Length of sub '$1' => %d chars\n", length $code;
Have fun,
Carl Forde
In reply to Re: Official GOLF score
by cforde
in thread Official GOLF score
by tachyon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |