Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Official GOLF score

by cforde (Monk)
on Jul 12, 2001 at 00:33 UTC ( [id://95846]=note: print w/replies, xml ) Need Help??


in reply to Official GOLF score

I don't like the idea of editing the code each time. So, I offer the following slightly different version:
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;
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.

Have fun,
Carl Forde

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://95846]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-04-19 14:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found