On Sat, Nov 24, 2001 at 10:33:37AM -0500, Stephen Adkins 
([EMAIL PROTECTED]) wrote:
> Hi,
> 
> The situation where this most bugs me is when I read data from
> a database (and I frequently have nullable columns), a row of
> data will have "undefs" in it.  Then I print the row and I get
> the "uninitialized variable warning".
> 
> In other words, "undef" is a valid value, but I want to print it,
> and I'm OK with it being printed as the empty string ("").

If you want "undef" printed as an empty string, then why not do that 
conversion explicitly.

print map { defined $_ ? $_ : '' } @array;

Of course, this gets much simpler in Perl 6

print map { $_ // '' } @array;

Dave...

-- 

  "Don't you boys know any _nice_ songs?"

Reply via email to