Andy Armstrong wrote:
>
> On 24 Jan 2008, at 21:24, Alberto Simões wrote:
>
>> Well, the subject says it all :)
>>
>> lc(undef) is the empty string.
>>
>> This might be good, this might be bad.
>> In any case, I think it should be documented.
>
>
> I think the anomaly is that it doesn't cause a warning even with use
> warnings. Functions generally don't seem to propagate definedness but
> they do typically warn if they weren't expecting undef.
Just to explain how I found out:
while(defined($line = lc(<>))) {
...
}
But ok, I can put it on two lines :)
--
Alberto Simões - Departamento de Informática - Universidade do Minho
Campus de Gualtar - 4710-057 Braga - Portugal