in reply to any built in function to take out null arrays elements?

my @userArray = qw(batman robin joker); my @userArray2; #this is a null array my @mainArray = (@userArray, @userArray2);
and then...
#@set should consist "batman robin joker", but not #"batman robin joker NULL"
@mainArray should already contain what you want.

my @set = map { exists($_)? $_ : delete($_) } @mainArray;
I think you misunderstand exists and delete.

-David