I wanted to create a 'main menu' perl script that would pick up all the perl scripts in my scripts directory, and display them for me to choose. Then I would select a number, which would correspond to an element in an array. The array holds the name of all the .pl files in the directory. The idea would be to launch the chosen perl file.
I used:
where
is the array,
is the number the user inputted, and
is the name of the file. As you can tell, I'm using perl on Windows.
However, when I do this, it appears to launch the script, but when I have to do any user input (which most of the scripts require), I get the following message:
It seems as though the perl file isn't recognising my input, or maybe even the perl script isn't being run. Very confused.
Any help will be gratefully received!!
I used:
Code:
$prog = $files[$input];
exec "perl C:/Perl/Scripts/$prog";
where
Code:
$file
Code:
$input
Code:
$prog
However, when I do this, it appears to launch the script, but when I have to do any user input (which most of the scripts require), I get the following message:
Code:
The name specified is not recognized as an
internal or external command, operable program or batch file.
It seems as though the perl file isn't recognising my input, or maybe even the perl script isn't being run. Very confused.
Any help will be gratefully received!!