my $foo = undef; my $bar = wrap_create_bar(\$foo); sub wrap_create_bar { if(defined(${$_[0]}) {create_bar($_[0]} else {create_bar(\"\0")} }