in reply to Official GOLF score
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
|
|---|