Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: code for review?

by tmoertel (Chaplain)
on Nov 12, 2004 at 05:33 UTC ( [id://407280]=note: print w/replies, xml ) Need Help??


in reply to Re: code for review?
in thread code for review?

First, excellent restructuring.

Maybe it's just me – and it very well could be (I'm goofy) – but that menu is just begging for some more compaction:

my $menu = { 0 => sub { init_file(\@teams) }, 1 => sub { team_update(\@values, \@teams) }, 2 => sub { team_find(\@values) }, 3 => sub { storage_backup() }, default => sub { print "Exiting\n" }, }; ( $menu->{$reply} || $menu->{default} ) -> ();

Ah, that feels better.     ;-)

Cheers,
Tom

Replies are listed 'Best First'.
Re^3: code for review?
by amadain (Novice) on Nov 12, 2004 at 13:01 UTC
    brilliant
    I implemented all of the changes in the replies that I got and this is all great to learn from. If there are any more comments they are greatly appreciated. The updated script is as follows. Please add more feedback if you think that i can improve it more.
    Thanks

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (None)
    As of 2024-04-25 01:31 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found