Hi again!
Concatenation means that several strings are tied together as one. The usual
way to do this in Perl is using the '.' operator:
my $string1 = "Hello ";
my $string2 = "World";
my $string3 = $string1.$string2;
In your code, you DON'T actually use the '.' operator. But you are in fact
using it implicitly by doing something like
my $string3 = "$string1 $string2";
- double quotes do dissolve variables to their values, so this is equivalent
to the above, and so it's in fact concatenation.
But the error itself, as Jos and I told you before, is NOT in the
conactenation but in the fact that you're trying to concatenate $INPUT which
doesn't have a value.
Sascha
----------
>Von: "Sally" <[EMAIL PROTECTED]>
>An: "Jos I. Boumans" <[EMAIL PROTECTED]> , "perl" <[EMAIL PROTECTED]>
>Betreff: RE: errors
>Datum: Fre, 27. Jul 2001 11:37 Uhr
>
> Thanks for that, but what does concatenation mean and where have I used it?
>
> Sally
>
> -----Original Message-----
> From: Jos I. Boumans [mailto:[EMAIL PROTECTED]]
> Sent: 27 July 2001 09:31
> To: Sally; perl
> Subject: Re: errors
>
>
> those errors mean that the variable you're trying to print out holds no
> value.
>
> ie, this would cause such an error:
>
> $bar = $foo . 'quux';
>
> since I didnt assign any value to $foo, it will say i usded an unitialized
> variable.
>
> a little pointer for readabillity of your code; instead of escaping all your
> double quotes in the print statement, concider this:
>
> print qq(Your E-mail:<input type=text name="email">
> value="$INPUT{'email'}"><br>\n");
>
> the 'qq' means 'double quote this next string'.. it does the same as
> normally putting " " around a string,
> except now perl wont get confused on what you mean =)
>
> hth
> Jos Boumans
>
>
>> I'm getting error messages that I don't understand. Below are the errors
> and
>> the associated line of code, any help would be much appreciated,
>>
>> Sally
>>
>>
>> Use of uninitialized value in read at guest.pl line 35.
>> read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
>>
>> Use of uninitialized value in concatenation (.) at guest.pl line 165.
>> print ("Your E-mail:<input type=text name=\"email\"
>> value=\"$INPUT{'email'}\"><br>\n");
>>
>> Use of uninitialized value in concatenation (.) at guest.pl line 171.
>> print ("<textarea name=comments COLS=60 ROWS=4 name=\"comments\"
>> value=\"$INPUT{'comments'}\"></textarea>\n");
>>
>>
>> --
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]