Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Seeking feedback on Tic-Tac-Toe

by synapse0 (Pilgrim)
on Jul 12, 2001 at 03:20 UTC ( [id://95886]=note: print w/replies, xml ) Need Help??


in reply to Seeking feedback on Tic-Tac-Toe

Ok, aside from -Tw and use strict; here's a few other suggestions..
In your param snarfing part, you might want to use something that works with defaults..
for example:
$across = param('across') ? param('across') : $across_default; $down = param('down') ? param('down') : $down_default; $team = param('team') ? pram('team') : $team_default; # $move is safe, will use defaults or set params $move = $down."_".$across;
CGI::Carp would be a good thing for error reporting (where the file open may die).

You open files inside if (param()) { but try and close them outside of the block.. it wont error, but it's ugly.
and lastly, probably more of a nitpick, you have a ton of file opening and closing.. there's probably a better way to handle that (like rewinding file)

-Syn0

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-19 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found