Brendan L. Brendan L. - 1 year ago 102
Groovy Question

command to find out if a value is initialized Perl

My question right now is based around a problem Im having with CSV documents but is more general than pertaining only to that. Im looking to use something like the null question mark in java/groovy/gosu to determine if an array index has been initailized.
I have something like:

for (my i=0; i<@engVals or i<@frenchVals; i++){
$csv->print($file, [$engVals[i]?:"", , $frenchVals[i]?:""]);
#where elvis opps ensure that the array at i is init and if not stores blank in the csv

Thank you so much in advance for your help.

Answer Source
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download