On 8/5/2004 6:23 PM, Jenda Krynicky wrote:

From: mike <[EMAIL PROTECTED]>

I have the following code

print "date times",@date,br;
if ($ti1){
print "time 1 is not empty";
}
else {
print "time 1 is empty";
}

If there is a value it works but not if there isn't ie:
if there is a value it prints "time 1 is not empty", but if there is
not nothing comes out

anyone any ideas?


Sounds strange. Could you send us a small complete script that would display the problem? Something we could run and see that it doesn't print anything even though (you belive) it should.

WAG, but maybe this:

if ($ti1) {

should more properly be written as:

if ( defined($ti1) && length($ti1) ) {



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to