#!/usr/bin/perl
print "content-type: text/html \n\n";
use strict;
use warnings;
my @userArray = qw(batman robin joker);
my @userArray2; #this is a null array
my @mainArray = (@userArray, @userArray2);
my @set = map { exists($_)? $_ : delete($_) } @mainArray;
#@set should consist "batman robin joker", but not
#"batman robin joker NULL"
print qq[@set\n];