Hello,
I hope someone can point me in the right direction.  As a newbie I am just
not sure where to go from here.   

I have a directory where I have several commands, I would like to create a
script that reads the files, prints them out and allows the user to pick
which one of the commands to run. 

All I have right now is a skeleton of the script I would like, but would
appreciate some direction.

#!/usr/local/bin/perl -w
opendir THISDIR, "./" or die "egad!: $!";
@allfiles = grep !/^\.\.?$/, readdir THISDIR;
closedir THISDIR;

for $file (@allfiles) {
        if ($file !~ /on.lst*|scriptfile.pl/i) {  #files I don't want
printed as they are not valid scripts for users
        print "$file\n";  
        }
}

What I have above would let the user do a simple cut and paste, but this is
not completly what I need.
I think what I want to do is create a hash with the filenames and a number
(this could be gotten from a count++) and then do something like prompting
the user for the number they want and then doing an exec on that.

Thanks for any help.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to