Good practice to detect empty string?
ipellew_at_pipemedia.co.uk
Date: 12/21/04
- Next message: ipellew_at_pipemedia.co.uk: "HowTo tell if from cmd_line || httpd"
- Previous message: ipellew_at_pipemedia.co.uk: "Howto covert to Hash structure?"
- Next in thread: Keith Keller: "Re: Good practice to detect empty string?"
- Reply: Keith Keller: "Re: Good practice to detect empty string?"
- Reply: Anno Siegel: "Re: Good practice to detect empty string?"
- Reply: jl_post_at_hotmail.com: "Re: Good practice to detect empty string?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: ipellew_at_pipemedia.co.uk: "HowTo tell if from cmd_line || httpd"
- Previous message: ipellew_at_pipemedia.co.uk: "Howto covert to Hash structure?"
- Next in thread: Keith Keller: "Re: Good practice to detect empty string?"
- Reply: Keith Keller: "Re: Good practice to detect empty string?"
- Reply: Anno Siegel: "Re: Good practice to detect empty string?"
- Reply: jl_post_at_hotmail.com: "Re: Good practice to detect empty string?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|