in reply to Can i make this more efficient with a special variable?
becomessub get_name { my $name = dblookup() || undef; $name; }
becomessub get_name { my $name = dblookup(); $name; }
becomessub get_name { dblookup(); }
As for the if, you could do*get_name = \&dblookup;
if ( my $name = get_name() )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can i make this more efficient with a special variable?
by nmerriweather (Friar) on Jan 10, 2006 at 21:24 UTC |