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 reply to Re: What is the best way to determine if a string is blank?
by lemming
in thread What is the best way to determine if a string is blank?
by fongsaiyuk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |