2008/12/5 Dermot <[EMAIL PROTECTED]>:
> Hi,
>
> I have some data from a dbi that looks  like this:
>
> +-----------+-----------+--------+------------------------+
> | title1 | title2 | oldtitle
> ------+----------------------------------------------------+
> | NULL   | NULL   | The cat jumped over the mat
>
>
> I used this statement to try and grab 1st, title1; 2nd title2; if all
> fails there should be data in oldtitle
>
>
> my $title = $image->title1 ? $image->title2 : $image->oldtitle;
>
> But that didn't work I got an undef. So I tested with this:



Sorry. Someone on the list mentioned to me before, a reference is
always true, so the test won't work.

Sorry for the bum post.
Dp.

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


Reply via email to