|go ahead... be a heretic|
Removing array elementsby sandrider (Acolyte)
|on Aug 24, 2005 at 00:18 UTC||Need Help??|
sandrider has asked for the wisdom of the Perl Monks concerning the following question:
I was told that I shouldn't use the C format of using for (i.e. for ($i=0;$i<10;$i++) for replacing the array's elements but use perl's for/foreach command. That works fine but I need to remove some cells/elements from an array, how do it using for/foreach?
my current code is like this:
I can't use delete and undef just removes the contents leaving my array with lots of empty 'spaces'. How can I remove the array's cell totally and not just the contents?