Good practice to detect empty string?

ipellew_at_pipemedia.co.uk
Date: 12/21/04


Date: 20 Dec 2004 16:04:34 -0800

Hi all;

Pls advise the perlophiliacs method of deciding a string is empty.

I am using
if ( $@ || $c_var eq "" ) {
but constantly read `eq` is expensive.

For example is
if ( $@ || ! length $c_var ) {
better, faster, cheaper

Regards
Ian



Relevant Pages

  • Re: Deletion of Empty Page in the Word Document through VBA
    ... The find string "^b" is not working. ... Regards ... "Kiruthiga" wrote: ... >>> scan each and every page and finding if any empty page is there. ...
    (microsoft.public.word.vba.general)
  • Re: Preview Data dialogue demands values for every param in a store pr
    ... "Empty" is not a very good term to use in regards to the ... string or null; since it's possible that not all of your params are strings, ... stored procedure. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: Testing empty combo box
    ... Sometime I have had to check for an empty ... string instead of a null value. ... Regards, ... > Chris. ...
    (microsoft.public.access.forms)
  • Re: Exporting excel to text file
    ... filenumber is just a new local variable which is going to hold the system ... >> Thank you so much for your help, the While statement and empty is ... The selection may very large as compared to what is ... >> 'Walk down each row and include it in the string if the cell is not ...
    (microsoft.public.excel.misc)
  • Re: A Logical Model for Lists as Relations
    ... I am aware of the difference between the number zero and an empty list. ... contents of a set - yields a bunch, which also has a comma union ... is a string of length 4. ... Empty strings and empty lists? ...
    (comp.databases.theory)