Re: uninitialised variable error

2003-01-24 Thread WilliamGunther
In a message dated 1/24/2003 1:42:42 AM Eastern Standard Time, 
[EMAIL PROTECTED] writes:


 #!/usr/bin/perl -w
 #
 # emails comments from the site to my address
 #
 use strict;
 use CGI;
 #
 #
 my $q = new CGI;
 my $name = $q-param( name );
 my $email = $q-param( email );
 my $comments = $q-param( comments );
 my $info = ($name\n$email\n$comments\n);
 

Works for me. Make sure you have a value for $name, $email, and $comments. 
Run a querry string with it or something, because if there is no 
param('name') then $name is initialized, as in it's 0, right?



uninitialised variable error

2003-01-23 Thread Jimmy George
Hello Everyone

The following code :-

#!/usr/bin/perl -w
#
# emails comments from the site to my address
#
use strict;
use CGI;
#
#
my $q = new CGI;
my $name = $q-param( name );
my $email = $q-param( email );
my $comments = $q-param( comments );
my $info = ($name\n$email\n$comments\n);

gives me an 'initialized variable' error for line 13 (the bottom line
here). There are more but probably of no interest to anyone.

Using each parameter alone does not fail. It looks as though adding a
parameter name immediately after a \n does not work. I thought it did!

tia for the simple answer

Jimmy George

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]