in reply to Writing to text file
The “immediate-IF” syntax can come in handy here: ( expression ? value_if_true : value_if_false )
Another handy way to do it would be to define a little sub such as:
sub quoted { my $value = shift; if (defined($value)) { return "\"$value\""; } else { return ""; } }
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Writing to text file
by Your Mother (Archbishop) on Feb 09, 2018 at 06:58 UTC |