in reply to Effecient shortcut for ?:
$foo = defined $bar ? bar : $default_for_foo; ## could be written as, but remember, that 0 is false $foo = $bar; $foo ||= $default_for_foo;
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Effecient shortcut for ?:
by thelenm (Vicar) on Aug 07, 2002 at 18:23 UTC |