in reply to concatenating partially uninitialized values

I use small subs for this:
sub undef2blank { return defined($_[0]) ? $_[0] : ""; } my $outPath = $obj->{outpath}{absolut} . "-" . undef2blank($obj->{sap} +{jfExtNum});
It's probaby slower than the other ideas suggested here, but it's obvious what it does and keeps the general style of the original code.

Replies are listed 'Best First'.
Re: Re: concatenating partially uninitialized values
by paulbort (Hermit) on Jun 18, 2003 at 18:33 UTC
    ++sgifford! Probably going to catch flames from the rabid OO'ers, but I like it.
    --
    Spring: Forces, Coiled Again!