- 1). Open a blank document in any text editor.
- 2). Type the line
#!/usr/bin/perl
use CGI qw/:standard/;
to start the Perl script and load the standard CGI routines. - 3). Type the command
my $my_string = "Hello Universe!"
to create a variable that contains the string "Hello Universe!" - 4). Type the command
print <<ENDHTML;
<html>
<body>
<p>$my_string<p>
</body>
<html>
ENDHTML
to print the value of the variable to the web page. - 5). Save the file with the ".cgi" file extension to indicate that it is a CGI script.
SHARE