in reply to Removing characters

If "no characters" could be equivalent to a null string, ie:
$string = "";
then perl will return "false" for any scalar with a null value. Just test for true or false on the value directly.
if ($string) { # ... do something }

Replies are listed 'Best First'.
RE: Re: Removing characters
by turnstep (Parson) on Apr 21, 2000 at 06:25 UTC
    But will also fail if $string = "0"