Run in Command Prompt
Most of all Perl scripts can be divided into two categories: CGI scripts and command prompt ones.
CGI scripts are intended to be run on a web server (for more information please see the Perl Programming Links). To run/debug a CGI script in DzSoft Perl Editor, please use the Run... or Quick Run menu items or appropriate toolbar buttons, or the Run tab. The following is an example of a CGI script:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><h1>Hello!</h1></html>\n";
Command prompt scripts are the other kind of Perl scripts. On Windows they must be run in a command prompt window. To run/debug them in DzSoft Perl Editor, please use the Run in Command Prompt menu item or toolbar button. Here is an example of a command prompt script:
#!/usr/bin/perl
print "Please enter you name: ";
$name = <STDIN>;
chomp($name);
print "Hello, $name!\n"; |