After configuring Perl, test the configuration through the following steps:
To execute a script, the script or the subdirectory containing the script should be present in the sys:\perl\web directory.
To execute the samples in the sys:\perl\webdemo folder, copy them to the sys:\perl\web directory.
Enter the URL, in the form of ‘http://Server_name:port_number/perl/scriptname’
For example, the URL for executing the script env.pl located under sys:\perl\web\perlscripts will be
http://server_name:port_number/perl/perlscripts/env.pl
If the setup is correct, information about environment variables is displayed in the browser.
The Perl sample scripts are available in the sys:\perl\scripts folder.
Execute the following command at the server console
perl <scriptname>
Example:
perl hello.pl
The above command opens a perl screen and displays the output. Press any key to close the screen.
By default, Perl will try to locate the script to be executed in sys:\perl\scripts or in PERL_ROOT if set. To execute scripts in any other locations specify the full path of the file or set the PERL_ROOT accordingly.