in reply to use slack;

How about changing to a object system. This might releive some of your redundancy?
package myObj; use strict; sub new { return bless {}, $_[0]; } sub one { print "One\n"; } sub two { print "Two\n"; } sub three { print "Three\n"; } 1;
and test code:
#!/usr/bin/perl -w use strict; use lib "."; use myObj; my $s = myObj->new(); my @cmd = qw( one two three ); foreach (@cmd) { $s->$_(); }
HTH

Replies are listed 'Best First'.
Re: Re: use slack;
by epoptai (Curate) on Dec 22, 2000 at 03:15 UTC
    Very interesting steveAZ98. I can see that this technique will be useful for future projects. Thanks for adding more light. I've uploaded the entire script that i was working on when this question came up here. It was inspired by the replies to this question. Thanks PM!