Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

•Re: perl/cgi Boggle

by merlyn (Sage)
on Aug 15, 2003 at 22:48 UTC ( [id://284268]=note: print w/replies, xml ) Need Help??


in reply to perl/cgi Boggle

Not really golfing here, but there's far too much code in that last subroutine.
sub build_board_array { my @board = split //, shift; s/Q/Qu/ foreach @board; @board = map { +{ line => [map +{ letter => $_ }, splice @board, 0, 4 ]}; } 1..4; return \@board; }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


UPDATE: oops, forgot one arrayref constructor.

Replies are listed 'Best First'.
Re: Re: perl/cgi Boggle
by ajdelore (Pilgrim) on Aug 15, 2003 at 23:28 UTC

    Much thanks... I knew there must have been a better way to do that. I should have asked the monks. :)

    </ajdelore>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (6)
As of 2024-04-25 08:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found