H
Hendrik Maryns
Hi,
I was wondering wether there is an easy way to eliminate all undefined
or empty elements of a list, except from skipping through it with a
foreach loop and rebuilding it. So, if I had a list like this:
(5,"jan","",$whatever,undef,undef,"someotherstring")
The result should be
(5,"jan",$whatever,"someotherstring")
Notice that I want the empty string to be removed too.
If this is a FAQ, I apologise, and would be very happy with a link.
Thanks, Hendrik
I was wondering wether there is an easy way to eliminate all undefined
or empty elements of a list, except from skipping through it with a
foreach loop and rebuilding it. So, if I had a list like this:
(5,"jan","",$whatever,undef,undef,"someotherstring")
The result should be
(5,"jan",$whatever,"someotherstring")
Notice that I want the empty string to be removed too.
If this is a FAQ, I apologise, and would be very happy with a link.
Thanks, Hendrik