On Wed, Apr 15, 2009 at 6:33 AM, John W. Krahn <jwkr...@shaw.ca> wrote: > Robert Citek wrote: >> >> You probably want ($Lang == "fr") > > Probably not. You are using a numerical comparison on a string which will > convert the string to a number so that is the same as saying: ($Lang == 0)
You are correct. Serves me right for trying to answer e-mails so late. $ perl -le 'use warnings ; $Lang = "foo" ; print "hello" if $Lang = "fr" ;' Found = in conditional, should be == at -e line 1. hello $ perl -le 'use warnings ; $Lang = "foo" ; print "hello" if $Lang == "fr" ;' Argument "fr" isn't numeric in numeric eq (==) at -e line 1. Argument "foo" isn't numeric in numeric eq (==) at -e line 1. hello Regards, - Robert -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/