theAcolyte has asked for the wisdom of the Perl Monks concerning the following question:
It showed a nice, simple sytax for saying
if(!defined($someValue)) { $myVar = "default" } else { $myVar = $somevalue }
except it didn't use an if or an else or even, if I remmeber correctly, curlie brackets. I seem to remember a ? or a : in there.
Anyone help out? :-) Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Syntax for 1 line "either this or this"
by BrowserUk (Patriarch) on May 29, 2003 at 22:58 UTC | |
by theAcolyte (Pilgrim) on May 29, 2003 at 23:09 UTC | |
by thelenm (Vicar) on May 29, 2003 at 23:14 UTC | |
by BrowserUk (Patriarch) on May 29, 2003 at 23:23 UTC | |
|
Re: Syntax for 1 line "either this or this"
by halley (Prior) on May 30, 2003 at 00:48 UTC | |
by parv (Parson) on May 30, 2003 at 06:54 UTC | |
|
Re: Syntax for 1 line "either this or this"
by arthas (Hermit) on May 29, 2003 at 23:10 UTC | |
|
Re: Syntax for 1 line "either this or this"
by pzbagel (Chaplain) on May 29, 2003 at 22:58 UTC | |
|
Re: Syntax for 1 line "either this or this"
by DigitalKitty (Parson) on May 30, 2003 at 16:18 UTC | |
|
Re: Syntax for 1 line "either this or this"
by Anonymous Monk on May 31, 2003 at 07:14 UTC |