Abigail wrote:
> On Thu, Jan 24, 2008 at 09:24:08PM +0000, Alberto Sim?es wrote:
>> Well, the subject says it all :)
>>
>> lc(undef) is the empty string.
>
> Of course. What would you expect? It's not different from 1 + undef being
> 1, and not undef. undef is not like NULL in SQL, where operation upon will
> return NULL. In Perl, undef is treated as the empty string if treated
> as a string, and as 0 if treated as a number. lc operates on strings,
> so lc(undef) will be the same as lc("").
OK
>> This might be good, this might be bad.> > What isn't good is that it doesn't warn.It's true.
>> In any case, I think it should be documented.> > Where do we stop? Should we document any case where undef is treated> as "" or 0? Well, good point ;)
--
Alberto Simões - Departamento de Informática - Universidade do Minho
Campus de Gualtar - 4710-057 Braga - Portugal