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?? |
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.
In Section
Seekers of Perl Wisdom
|
|