Could use a construct like

my $calls_nrj = scalar(@calls_nrj) ? join() : '';