How to Run a Perl Script Remotely in Windows
Perl is an older CGI scripting language that runs on Windows, Linux or Macintosh. The Perl scripting language runs on Web servers, but you can use debugging tools to run the scripts in the DOS command prompt in Windows. You must set the remote computer's path, so you can run the Perl scripts on the remote computer's directory. You can then use the "export" utility to upload the script to the remote computer and run the file on your local machine.
Instructions
-
-
1
Click the Windows "Start" button and type "cmd" in the menu text box. Press "Enter" to open the command prompt.
-
2
Set the path to the remote computer's directory. The following command sets the Perl path to the remote computer's "perl" shared directory:
set PERL5LIB=\\remotecomputer\perl
Replace "remotecomputer" with the name of the remote server on your network.
-
-
3
Export the file to the remote computer's directory you set up in the previous step. The following statement exports the index.pl file to the remote computer's shared directory:
export PERL5LIB=/myfiles/index.pl
-
4
Run the exported Perl file in the debugger. Type the following statement to execute the code:
perl -d index.pl
The results from the Perl file are displayed in the DOS command prompt.
-
1