in reply to Hashing uninitialized values when no value returned from DBI sql select
$myhash{$val_1} = defined $val_2 ? $val_2 : '';
compact if-then-else suggested notation. It's really exactly the If-Else structure I proposed in the OP, just a nice compact notation. Haven't used it much - tend to be more verbose - but this is a good application for it.
Is there a name for this kind of notation?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hashing uninitialized values when no value returned from DBI sql select
by kyle (Abbot) on Feb 28, 2008 at 16:23 UTC | |
by punch_card_don (Curate) on Feb 28, 2008 at 17:44 UTC |