Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: What is the best way to determine if a string is blank?

by lemming (Priest)
on Jan 03, 2001 at 21:35 UTC ( [id://49565]=note: print w/replies, xml ) Need Help??


in reply to What is the best way to determine if a string is blank?

I don't see anything wrong with your construct and I would think a regex would make the code less readable in some circles. Depending on $/, /^$/ would check for an empty string as well. So if you're replacing blank variables you could do s/^$/Hi there/.

I'm curious what the more articulate monks have to say.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://49565]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-25 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found