On Dec 1, 2005, at 12:48, Beast wrote:


How do I avoid this kind of warning?

Useless use of lc in void context at ./myscript.pl line 87.


Tried to use :

lc $string if $string;

but still gives warning.

I can count with my fingers the times a warning was not triggered by something that was actually a bug in my code. One has to understand what's happening and take an informed decision before disabling or writing some blind workaround to avoid it.

In that case the use of lc() is suspicious because lc() does not modify $string in place, you probably want:

    $string = lc $string;

-- fxn

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to