Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: OpenBSD Package Manager in perl

by MeowChow (Vicar)
on Mar 19, 2001 at 09:09 UTC ( #65365=note: print w/replies, xml ) Need Help??


in reply to OpenBSD Package Manager in perl

I'd try it out but I don't have l^Hbsd. One initial reaction, upon glancing at the code, however, was that the following code could and probably should be transformed into a hash dispatch:
if ($sel == 1) { show_installed() } elsif ($sel == 2) { show_available() } elsif ($sel == 3) { rgetpkglist() } ...
Like so:
my %dispatch = ( 1 => \&show_installed, 2 => \&show_available, 3 => \&rgetpkglist, ... } $dispatch{$sel}->();
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2021-01-28 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?