|
| Topics this page: Related:
|
|
|
Download from
ASPN.activestate the most prevalent distribution of Perl.
There are distributions of Perl for many platforms: Windows, Linux, Solaris, etc. On Windows, choose an "ASC" or "MSI" (Windows System Installer). Sample code is available from companion websites to books on Perl:
|
|
|
|
|
|
|
|
|
The use operator loads the ":standard" |
use CGI qw/:standard/;
$foo = new CGI;
$guest_record = $foo->param('guest_name')
. ":" . $foo->param('email_address') ;
A dot is used to concatenate two strings.
open STDERR, ">&STDOUT"
open GUESTS, ">> guest.data"
or die $foo->header,"Can't open guest database: $!\n";
open(RUN_PARMS, "| get_it");
open(FORMATTED_REPORT_FILE, "format_it |");
while (<GUESTS>) {
($guest_name, $email_address, $phone_number, $browser) = split /:/;
print %ENV;
print "<A href=\"mailto:webmaster\@site.com\">Webmaster</A>. \n";
for ($count = 1; $count <= 10; $count += 1) { print("the counter is now $count\n"); }
print GUESTS $guest_record, "\n";
close GUESTS;
Operators:
4 <=> 1 # returns -1CAUTION: The only string values that evaluate to false are "" and "0". Strings such as "00" and "0.0" return true, not false.3 <=> 3.0 # returns 0
1 <=> 4.0 # returns 1
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page Thank you! | |||