From: Dave Bass Date: 2008-07-01T06:49:12+09:00 Subject: Re: What am I doing wrong! Arrays Florian Gilcher wrote: > That a typical PHP behaviour, because PHP casts Strings to Ints before > comparing. Similar thing with Perl. Perl scalars can be numbers or strings, depending on the context. Sometimes you have to force them to be one or the other; e.g. adding 0 to a scalar makes it more number-like; appending an empty string "" makes it more string-like. But generally it behaves in a sensible way. Comparing a string to an integer is a typical gotcha for us ex-Perlers. Dave -- Posted via http://www.ruby-forum.com/.