in reply to Testing for empty string

I use length():

if (length($rc=$ref->getc)) { ... }

But if that's the standard getc() then you probably want defined() instead.

    -- Chip Salzenberg, Free-Floating Agent of Chaos