Brian <brian5432...@yahoo.co.uk> wrote:
> could someone please help me with this little problem?
> I am trying to include an if statement part way through printing.
> When the program reaches the line   if ($Lang = fr ) { print "
> that line gets ignored and the cgi keeps going to the end.
> 
> thanks
> Brian
> 
> 
> 
> #! c:\perl\bin\perl.exe -T
> use warnings;
> #use strict;

You should always "use strict;" unless you know why and when.

As to your if condition, a single "=" is an assignment, not a comparison.

And in any case, you'll want to use the "eq" operator for string comparisons. 
Otherwise the comparison will be done numerically (0 == 0) and the code will 
execute all of the time.

HTH,
Thomas

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to